Caramela Posted January 1, 2019 Share Posted January 1, 2019 هلا شباب الله يعزكم اليوم سويت سكربت بس ما ادري ايش المشكله فيه يعني الدرع ما بيختفي لما اخلي حد يدمجه و الدرع يبان صغير ياريت لو تعرف كيف يتصلح ما تبخل علي Quote elementVest = {} function getArmour(hitPlayer) if isElement(hitPlayer) then local player = hitPlayer local armour = getPedArmor(player) if armour > 0 then x,y,z = getElementPosition(player) if not isElement(elementVest[player]) then exports.bone_attach:detachElementFromBone(elementVest[player]) elementVest[player] = false end elementVest[player] = createObject(1242,x,y,z) exports.bone_attach:attachElementToBone(elementVest[player],player,3,0,0.04,0.08,0,0,180) else if elementVest[player] and isElement(elementVest[player]) then exports.bone_attach:detachElementFromBone(elementVest[player]) destroyElement(elementVest[player]) elementVest[player] = false end end end end setTimer(getArmour, 1000, 1) Link to comment
nxFairlywell Posted January 1, 2019 Share Posted January 1, 2019 elementVest = {} function getArmour(hitPlayer) if isElement(hitPlayer) then local player = hitPlayer local armour = getPedArmor(player) if armour > 0 then x,y,z = getElementPosition(player) if not isElement(elementVest[player]) then exports.bone_attach:detachElementFromBone(elementVest[player]) elementVest[player] = false end elementVest[player] = createObject(1242,x,y,z) exports.bone_attach:attachElementToBone(elementVest[player],player,3,0,0.04,0.08,0,0,180) else if elementVest[player] and isElement(elementVest[player]) then exports.bone_attach:detachElementFromBone(elementVest[player]) destroyElement(elementVest[player]) elementVest[player] = false end end end end setTimer(getArmour, 1000, 1, localPlayer) 1 Link to comment
Caramela Posted January 1, 2019 Author Share Posted January 1, 2019 1 hour ago, NX_CI said: elementVest = {} function getArmour(hitPlayer) if isElement(hitPlayer) then local player = hitPlayer local armour = getPedArmor(player) if armour > 0 then x,y,z = getElementPosition(player) if not isElement(elementVest[player]) then exports.bone_attach:detachElementFromBone(elementVest[player]) elementVest[player] = false end elementVest[player] = createObject(1242,x,y,z) exports.bone_attach:attachElementToBone(elementVest[player],player,3,0,0.04,0.08,0,0,180) else if elementVest[player] and isElement(elementVest[player]) then exports.bone_attach:detachElementFromBone(elementVest[player]) destroyElement(elementVest[player]) elementVest[player] = false end end end end setTimer(getArmour, 1000, 1, localPlayer) احيك بس للاسف الشمكله لسه موجوده لازم اغير ال لازم اغير ال settimer عشان يشتغل و الدرع مش بيتشال لما اخلي حد يدمجه Link to comment
Caramela Posted January 2, 2019 Author Share Posted January 2, 2019 (edited) ابي اخلي ازا اخزت درع يظهر علي جسدي و لما حد يدمجه يخليه 0 الدرع يختفي من علي جسدي 4 hours ago, NX_CI said: انت وش تبي بالضبط Edited January 2, 2019 by Caramela Link to comment
nxFairlywell Posted January 2, 2019 Share Posted January 2, 2019 (edited) طيب استخدم createObject getElementHealth attachElements "onPlayerDamage" destroyElement detachElements isElementAttached Edited January 2, 2019 by NX_CI Link to comment
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