Padul Posted February 28, 2016 Posted February 28, 2016 this showups in console [2016-02-28 17:21:05] ERROR: [DayZ-MTA]/DayZ/survivorSystem.lua:395: attempt to call global 'attachElementToBone' (a nil value) [2016-02-28 17:20:54] ERROR: [DayZ-MTA]/DayZ/survivorSystem.lua:437: attempt to call global 'detachElementFromBone' (a nil value) [2016-02-28 17:20:48] ERROR: [DayZ-MTA]/DayZ/survivorSystem.lua:434: attempt to call global 'attachElementToBone' (a nil value) [2016-02-28 17:20:47] WARNING: [DayZ-MTA]/DayZ/survivorSystem.lua:343: Bad argument @ 'setPedSkin' [Expected element at argument 1, got number '179'] [2016-02-28 17:20:47] ERROR: [DayZ-MTA]/DayZ/survivorSystem.lua:437: attempt to call global 'detachElementFromBone' (a nil value) [2016-02-28 17:20:14] ERROR: [DayZ-MTA]/DayZ/survivorSystem.lua:397: attempt to call global 'attachElementToBone' (a nil value) --attaches local elementBackpack = {} function backPackBack (dataName,oldValue) if getElementType(source) == "player" and dataName =="MAX_Slots" then local newValue = getElementData(source,dataName) if elementBackpack[source] then detachElementFromBone(elementBackpack[source]) destroyElement(elementBackpack[source]) elementBackpack[source] = false end local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) if newValue == 12 then elementBackpack[source] = createObject(3026,x,y,z) elseif newValue == 16 then elementBackpack[source] = createObject(1248,x,y,z) elseif newValue == 26 then elementBackpack[source] = createObject(1575,x,y,z) elseif newValue == 36 then elementBackpack[source] = createObject(1252,x,y,z) elseif newValue == 8 then return end if newValue == 26 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 end addEventHandler ( "onElementDataChange", getRootElement(), backPackBack ) function backpackRemoveQuit () 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 ))
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now