Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-04-25, 16:21


ProWhiteQ

Ucze sie LUA






Wiek: 45
Na forum: 4341 dni
Posty: 38

Piwa: 6

Respekt: 50

Witam! Zwracam si? z pro?b? o pomoc z plecakami na serwerze DayZ. Dobra do rzeczy chodzi o to, ?e gdy znajdzie si? plecak i si? go za?o?y to go nie wida? na plecach, a sloty w eq s? powi?kszone, wi?c w czym mo?e tu by? problem?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-25, 16:41


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Podczas zak?adania s? b??dy w /debugscript 3?

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Wilku3
Wysłany: 2018-04-25, 16:49


ProWhiteQ

Ucze sie LUA






Wiek: 45
Na forum: 4341 dni
Posty: 38

Piwa: 6

Respekt: 50

Nie, nie ma ?adnych b??d?w.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-25, 16:50


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

"ProWhiteQ" napisał/a:

Nie, nie ma ?adnych b??d?w.


Czy Tw?j gamemode posiada opcj? widoczno?ci obiekt?w na graczu? Po niekt?re nie posiada?y takowej opcji

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-25, 16:59


ProWhiteQ

Ucze sie LUA






Wiek: 45
Na forum: 4341 dni
Posty: 38

Piwa: 6

Respekt: 50

Wychodzi na to, ?e nie posiada takiej opcji. M?g? bym prosi? o pomoc z rozwi?zaniem tego?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-25, 18:17


patuniunia







Wiek: 24
Na forum: 3840 dni
Posty: 5
Nick w MP: patuniunia

Piwa: 63

Respekt: 50

Ostrzeżeń: 100%
bone_attach?

sci?gnij ten skrypt i go wgraj
b?d? dodaj do skryptu

createObject

attachElements


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-25, 21:07


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Co? znalaz?em, poczytaj Sobie kod...

--[[
#-----------------------------------------------------------------------------#
----*                    MTA DayZbackpack_player.lua                    *----
----* Original AuthorMarwin W., GermanyLower SaxonyOtterndorf        *----
----* This gamemode is being developed by LCiBeR961B0Y                *----
----* TypeSERVER                                                        *----
#-----------------------------------------------------------------------------#
]]

function addBackpackToPlayer(player,slots)
    local source player
    local x,y,getElementPosition(source)
    local rx,ry,rz getElementRotation(source)
    if slots == 8 then
        elementBackpack[source] = createObject(3026,x,y,z) -- Patrol Pack
    elseif slots == gameplayVariables["assaultpack_slots"then
        elementBackpack[source] = createObject(1644,x,y,z) -- Assault Pack (ACU)
    elseif slots == gameplayVariables["czechvest_slots"then
        elementBackpack[source] = createObject(1248,x,y,z) -- Czech Vest Pouch
    elseif slots == gameplayVariables["alice_slots"then
        elementBackpack[source] = createObject(2382,x,y,z) -- ALICE Pack
    elseif slots == gameplayVariables["survival_slots"then
        elementBackpack[source] = createObject(1314,x,y,z) -- Survival ACU
    elseif slots == gameplayVariables["britishassault_slots"then
        elementBackpack[source] = createObject(1318,x,y,z) -- British Assault Pack
    elseif slots == gameplayVariables["coyote_slots"then
        elementBackpack[source] = createObject(1252,x,y,z) -- Backpack (Coyote)
    elseif slots == gameplayVariables["czech_slots"then
        elementBackpack[source] = createObject(1575,x,y,z) -- Czech Backpack
    elseif slots gameplayVariables["czech_slots"then
        return
    end
    if slots == gameplayVariables["czech_slots"then
        attachElementToBone(elementBackpack[source],source,3,0,-0.16,0.05,270,0,180)
    else
        attachElementToBone(elementBackpack[source],source,3,0,-0.225,0.05,90,0,0)
    end    
end
--addEventHandler ("onElementDataChange"rootaddBackpackToPlayer)

function backpackRemoveQuit ()
    if getElementData(source,"isDead"then return end
    if elementBackpack[sourcethen
        detachElementFromBone(elementBackpack[source])
        destroyElement(elementBackpack[source])
    end
    if elementWeaponBack[sourcethen
        detachElementFromBone(elementWeaponBack[source])
        destroyElement(elementWeaponBack[source])    
        elementWeaponBack[source] = false
    end    
end
addEventHandler "onPlayerQuit"getRootElement(), backpackRemoveQuit )

elementWeaponBack = {}
function weaponSwitchBack previousWeaponIDcurrentWeaponID )
    local weapon1 playerStatusTable[source]["currentweapon_1"]
    if not weapon1 then return end
    local ammoData1,weapID1 getWeaponAmmoFromName(weapon1)
    local x,y,getElementPosition(source)
    local rx,ry,rz getElementRotation(source)
    if previousWeaponID == weapID1 then
        if elementWeaponBack[sourcethen
            detachElementFromBone(elementWeaponBack[source])
            destroyElement(elementWeaponBack[source])
            elementWeaponBack[source] = false
        end
        elementWeaponBack[source] = createObject(getWeaponObjectID(weapID1),x,y,z)
        setObjectScale(elementWeaponBack[source],0.875)
        if elementBackpack[sourcethen
            if weapID1 == 8 then
                attachElementToBone(elementWeaponBack[source],source,3,0.19,-0.25,-0.1,0,0,90)
            else
                attachElementToBone(elementWeaponBack[source],source,3,0.19,-0.31,-0.1,0,270,-90)
            end
        else
            if weapID1 == 8 then
                attachElementToBone(elementWeaponBack[source],source,3,-0.19,-0.11,-0.1,0,0,90)
            else
                attachElementToBone(elementWeaponBack[source],source,3,0.19,-0.11,-0.1,0,270,10)
            end
        end
    elseif currentWeaponID == weapID1 then
        detachElementFromBone(elementWeaponBack[source])
            if elementWeaponBack[sourcethen
                destroyElement(elementWeaponBack[source])
            end
        elementWeaponBack[source] = false
    end
end
addEventHandler "onPlayerWeaponSwitch"getRootElement(), weaponSwitchBack )

function removeBackWeaponOnDrop ()
    if elementWeaponBack[sourcethen
        detachElementFromBone(elementWeaponBack[source])
        destroyElement(elementWeaponBack[source])    
        elementWeaponBack[source] = false
    end
end
addEvent("removeBackWeaponOnDrop",true)
addEventHandler("removeBackWeaponOnDrop",getRootElement(),removeBackWeaponOnDrop)

function removeAttachedOnDeath ()
    if elementBackpack[source] and playerStatusTable[source]["MAX_Slots"] ~= 8 then
        detachElementFromBone(elementBackpack[source])
        destroyElement(elementBackpack[source])
    end
    if elementWeaponBack[sourcethen
        detachElementFromBone(elementWeaponBack[source])
        destroyElement(elementWeaponBack[source])    
        elementWeaponBack[source] = false
    end    
end
addEventHandler("killDayZPlayer",getRootElement(),removeAttachedOnDeath)


?r?d?o: >KLIK<

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
ProWhiteQ
Wysłany: 2018-04-27, 18:22


ProWhiteQ

Ucze sie LUA






Wiek: 45
Na forum: 4341 dni
Posty: 38

Piwa: 6

Respekt: 50

"Ciastuu?" napisał/a:

Co? znalaz?em, poczytaj Sobie kod...

--[[
#-----------------------------------------------------------------------------#
----*                    MTA DayZbackpack_player.lua                    *----
----* Original AuthorMarwin W., GermanyLower SaxonyOtterndorf        *----
----* This gamemode is being developed by LCiBeR961B0Y                *----
----* TypeSERVER                                                        *----
#-----------------------------------------------------------------------------#
]]

function addBackpackToPlayer(player,slots)
    local source player
    local x,y,getElementPosition(source)
    local rx,ry,rz getElementRotation(source)
    if slots == 8 then
        elementBackpack[source] = createObject(3026,x,y,z) -- Patrol Pack
    elseif slots == gameplayVariables["assaultpack_slots"then
        elementBackpack[source] = createObject(1644,x,y,z) -- Assault Pack (ACU)
    elseif slots == gameplayVariables["czechvest_slots"then
        elementBackpack[source] = createObject(1248,x,y,z) -- Czech Vest Pouch
    elseif slots == gameplayVariables["alice_slots"then
        elementBackpack[source] = createObject(2382,x,y,z) -- ALICE Pack
    elseif slots == gameplayVariables["survival_slots"then
        elementBackpack[source] = createObject(1314,x,y,z) -- Survival ACU
    elseif slots == gameplayVariables["britishassault_slots"then
        elementBackpack[source] = createObject(1318,x,y,z) -- British Assault Pack
    elseif slots == gameplayVariables["coyote_slots"then
        elementBackpack[source] = createObject(1252,x,y,z) -- Backpack (Coyote)
    elseif slots == gameplayVariables["czech_slots"then
        elementBackpack[source] = createObject(1575,x,y,z) -- Czech Backpack
    elseif slots gameplayVariables["czech_slots"then
        return
    end
    if slots == gameplayVariables["czech_slots"then
        attachElementToBone(elementBackpack[source],source,3,0,-0.16,0.05,270,0,180)
    else
        attachElementToBone(elementBackpack[source],source,3,0,-0.225,0.05,90,0,0)
    end    
end
--addEventHandler ("onElementDataChange"rootaddBackpackToPlayer)

function backpackRemoveQuit ()
    if getElementData(source,"isDead"then return end
    if elementBackpack[sourcethen
        detachElementFromBone(elementBackpack[source])
        destroyElement(elementBackpack[source])
    end
    if elementWeaponBack[sourcethen
        detachElementFromBone(elementWeaponBack[source])
        destroyElement(elementWeaponBack[source])    
        elementWeaponBack[source] = false
    end    
end
addEventHandler "onPlayerQuit"getRootElement(), backpackRemoveQuit )

elementWeaponBack = {}
function weaponSwitchBack previousWeaponIDcurrentWeaponID )
    local weapon1 playerStatusTable[source]["currentweapon_1"]
    if not weapon1 then return end
    local ammoData1,weapID1 getWeaponAmmoFromName(weapon1)
    local x,y,getElementPosition(source)
    local rx,ry,rz getElementRotation(source)
    if previousWeaponID == weapID1 then
        if elementWeaponBack[sourcethen
            detachElementFromBone(elementWeaponBack[source])
            destroyElement(elementWeaponBack[source])
            elementWeaponBack[source] = false
        end
        elementWeaponBack[source] = createObject(getWeaponObjectID(weapID1),x,y,z)
        setObjectScale(elementWeaponBack[source],0.875)
        if elementBackpack[sourcethen
            if weapID1 == 8 then
                attachElementToBone(elementWeaponBack[source],source,3,0.19,-0.25,-0.1,0,0,90)
            else
                attachElementToBone(elementWeaponBack[source],source,3,0.19,-0.31,-0.1,0,270,-90)
            end
        else
            if weapID1 == 8 then
                attachElementToBone(elementWeaponBack[source],source,3,-0.19,-0.11,-0.1,0,0,90)
            else
                attachElementToBone(elementWeaponBack[source],source,3,0.19,-0.11,-0.1,0,270,10)
            end
        end
    elseif currentWeaponID == weapID1 then
        detachElementFromBone(elementWeaponBack[source])
            if elementWeaponBack[sourcethen
                destroyElement(elementWeaponBack[source])
            end
        elementWeaponBack[source] = false
    end
end
addEventHandler "onPlayerWeaponSwitch"getRootElement(), weaponSwitchBack )

function removeBackWeaponOnDrop ()
    if elementWeaponBack[sourcethen
        detachElementFromBone(elementWeaponBack[source])
        destroyElement(elementWeaponBack[source])    
        elementWeaponBack[source] = false
    end
end
addEvent("removeBackWeaponOnDrop",true)
addEventHandler("removeBackWeaponOnDrop",getRootElement(),removeBackWeaponOnDrop)

function removeAttachedOnDeath ()
    if elementBackpack[source] and playerStatusTable[source]["MAX_Slots"] ~= 8 then
        detachElementFromBone(elementBackpack[source])
        destroyElement(elementBackpack[source])
    end
    if elementWeaponBack[sourcethen
        detachElementFromBone(elementWeaponBack[source])
        destroyElement(elementWeaponBack[source])    
        elementWeaponBack[source] = false
    end    
end
addEventHandler("killDayZPlayer",getRootElement(),removeAttachedOnDeath)


?r?d?o: >KLIK<



Dzi?ki wielkie za pomoc dzia?a ;)

Postaw piwo autorowi tego posta
 

 
Tagi: plecaki :: dayz
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku