Machine Posted June 25, 2013 Share Posted June 25, 2013 whats wrong in this code it dont work local marker = createMarker(-2596.625, 579.358, 14, 'cylinder', 2.0, 255, 0, 0, 150) addEventHandler("onClientMarkerHit",root, function(h) if h == localPlayer and source == marker then addEventHandler("onClientRender",root,drawText) setElementFrozen ( h, true ) giveWeapon ( thePlayer, 31, 200 ) end end ) function drawText() dxDrawText("Prees F To Exit!",423.0,601.0,623.0,637.0,tocolor(255,255,255,255),2.0,"clear","left","top",false,false,false) end function h() removeEventHandler("onClientRender", root,drawText) setElementFrozen ( localPlayer, false ) takeWeapon ( thePlayer, 31, 200 ) end bindKey ( "f", "down", h ) Link to comment
iPrestege Posted June 25, 2013 Share Posted June 25, 2013 Hi ! You can't use give - take weapon client side it's server side only. Link to comment
Machine Posted June 25, 2013 Author Share Posted June 25, 2013 i can use trigger but how? Link to comment
iPrestege Posted June 25, 2013 Share Posted June 25, 2013 i can use trigger but how? triggerServerEvent Then : giveWeapon takeWeapon bindKey getElementsByType 'onPlayerJoin' and 'onResourceStart' 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