SkatCh Posted August 1, 2014 Posted August 1, 2014 hi guys please can anyone help me to create a command to drop briefcase like this onPlayerWasted : addEventHandler("onPlayerWasted",root, function () if getElementData(source,"bag") and getElementData(source,"bag") == true then local data = getElementData(atBag,"num") local data = tonumber(data) local x,y,z = getElementPosition(source) setElementData(source,"bag",false) destroyElement(atBag) destroyElement(marker) destroyElement(bli) destroyElement(marBli) ob = createPickup(x,y,z,3,1210,0) setElementCollisionsEnabled(ob,false) mar = createMarker(x,y,z,"corona",0.9,255,0,0,0) setElementData(mar,"num",data) bl = createBlipAttachedTo(mar,52) end end )
SkatCh Posted August 1, 2014 Author Posted August 1, 2014 lol i'm asking how to create it i tried this but didn't work : function Drop () if getElementData(source,"bag") and getElementData(source,"bag") == true then local data = getElementData(atBag,"num") local data = tonumber(data) local x,y,z = getElementPosition(source) setElementData(source,"bag",false) destroyElement(atBag) destroyElement(marker) destroyElement(bli) destroyElement(marBli) ob = createPickup(x,y,z,3,1210,0) setElementCollisionsEnabled(ob,false) mar = createMarker(x,y,z,"corona",0.9,255,0,0,0) setElementData(mar,"num",data) bl = createBlipAttachedTo(mar,52) end end addCommandHandler ("dropbc" , drop)
#DRAGON!FIRE Posted August 1, 2014 Posted August 1, 2014 the pickup and marker to all .. or to player just ?
SkatCh Posted August 1, 2014 Author Posted August 1, 2014 just for the player who have the Briefcase .
#DRAGON!FIRE Posted August 1, 2014 Posted August 1, 2014 u need table and use isElement to cheek if is marker and other elemets is don't destroyed .. and destroyElement and onPlayerQuit Remove Player From Table and destroyElement
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