Wysłany: 2018-04-25, 16:21
ProWhiteQ
Ucze sie LUA
Wiek: 45 Na forum: 4341 dni Posty: 38
Piwa : 6
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?
Wysłany: 2018-04-25, 16:41
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Podczas zak?adania s? b??dy w /debugscript 3 ?
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
Nie, nie ma ?adnych b??d?w.
Wysłany: 2018-04-25, 16:50
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"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
Wysłany: 2018-04-25, 16:59
ProWhiteQ
Ucze sie LUA
Wiek: 45 Na forum: 4341 dni Posty: 38
Piwa : 6
Wychodzi na to, ?e nie posiada takiej opcji. M?g? bym prosi? o pomoc z rozwi?zaniem tego?
Wysłany: 2018-04-25, 18:17
patuniunia
Wiek: 24 Na forum: 3840 dni Posty: 5
Nick w MP: patuniunia
Piwa : 63
bone_attach?
sci?gnij ten skrypt i go wgraj
b?d? dodaj do skryptu
createObject
attachElements
Wysłany: 2018-04-25, 21:07
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Co? znalaz?em, poczytaj Sobie kod...
--[[
#-----------------------------------------------------------------------------#
----* MTA DayZ : backpack_player . lua *----
----* Original Author : Marwin W ., Germany , Lower Saxony , Otterndorf *----
----* This gamemode is being developed by L , CiBeR96 , 1B0Y *----
----* Type : SERVER *----
#-----------------------------------------------------------------------------#
]]
function addBackpackToPlayer ( player , slots )
local source = player
local x , y , z = 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" , root , addBackpackToPlayer )
function backpackRemoveQuit ()
if getElementData ( source , "isDead" ) then return end
if elementBackpack [ source ] then
detachElementFromBone ( elementBackpack [ source ])
destroyElement ( elementBackpack [ source ])
end
if elementWeaponBack [ source ] then
detachElementFromBone ( elementWeaponBack [ source ])
destroyElement ( elementWeaponBack [ source ])
elementWeaponBack [ source ] = false
end
end
addEventHandler ( "onPlayerQuit" , getRootElement (), backpackRemoveQuit )
elementWeaponBack = {}
function weaponSwitchBack ( previousWeaponID , currentWeaponID )
local weapon1 = playerStatusTable [ source ][ "currentweapon_1" ]
if not weapon1 then return end
local ammoData1 , weapID1 = getWeaponAmmoFromName ( weapon1 )
local x , y , z = getElementPosition ( source )
local rx , ry , rz = getElementRotation ( source )
if previousWeaponID == weapID1 then
if elementWeaponBack [ source ] then
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 [ source ] then
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 [ source ] then
destroyElement ( elementWeaponBack [ source ])
end
elementWeaponBack [ source ] = false
end
end
addEventHandler ( "onPlayerWeaponSwitch" , getRootElement (), weaponSwitchBack )
function removeBackWeaponOnDrop ()
if elementWeaponBack [ source ] then
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 [ source ] then
detachElementFromBone ( elementWeaponBack [ source ])
destroyElement ( elementWeaponBack [ source ])
elementWeaponBack [ source ] = false
end
end
addEventHandler ( "killDayZPlayer" , getRootElement (), removeAttachedOnDeath )
?r?d?o: >KLIK<
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
"Ciastuu?" napisał/a :Co? znalaz?em, poczytaj Sobie kod...
--[[
#-----------------------------------------------------------------------------#
----* MTA DayZ : backpack_player . lua *----
----* Original Author : Marwin W ., Germany , Lower Saxony , Otterndorf *----
----* This gamemode is being developed by L , CiBeR96 , 1B0Y *----
----* Type : SERVER *----
#-----------------------------------------------------------------------------#
]]
function addBackpackToPlayer ( player , slots )
local source = player
local x , y , z = 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" , root , addBackpackToPlayer )
function backpackRemoveQuit ()
if getElementData ( source , "isDead" ) then return end
if elementBackpack [ source ] then
detachElementFromBone ( elementBackpack [ source ])
destroyElement ( elementBackpack [ source ])
end
if elementWeaponBack [ source ] then
detachElementFromBone ( elementWeaponBack [ source ])
destroyElement ( elementWeaponBack [ source ])
elementWeaponBack [ source ] = false
end
end
addEventHandler ( "onPlayerQuit" , getRootElement (), backpackRemoveQuit )
elementWeaponBack = {}
function weaponSwitchBack ( previousWeaponID , currentWeaponID )
local weapon1 = playerStatusTable [ source ][ "currentweapon_1" ]
if not weapon1 then return end
local ammoData1 , weapID1 = getWeaponAmmoFromName ( weapon1 )
local x , y , z = getElementPosition ( source )
local rx , ry , rz = getElementRotation ( source )
if previousWeaponID == weapID1 then
if elementWeaponBack [ source ] then
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 [ source ] then
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 [ source ] then
destroyElement ( elementWeaponBack [ source ])
end
elementWeaponBack [ source ] = false
end
end
addEventHandler ( "onPlayerWeaponSwitch" , getRootElement (), weaponSwitchBack )
function removeBackWeaponOnDrop ()
if elementWeaponBack [ source ] then
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 [ source ] then
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
Tagi: plecaki :: dayz
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: