IIIIlllllIII Posted October 2, 2011 Share Posted October 2, 2011 hi i wanna when i press the button remove jetpack i have error with this code ( nil value) this the code client said ======================== function toggleJetPack() removePedJetPack(source) end bindKey('j', 'down', toggleJetPack) =========================== pleez how i make the jetpack remove with button j i have error Link to comment
BinSlayer1 Posted October 2, 2011 Share Posted October 2, 2011 removePedJetPack - server only function client function toggleJetPack() triggerServerEvent('jetPackOff', getLocalPlayer()) end bindKey('j', 'down', toggleJetPack) server addEvent('jetPackOff', true) addEventHandler('jetPackOff', getRootElement(), function() removePedJetPack(source) end ) But I dont know how you can even give the jetpack clientside since givePedJetPack is ALSO serverside only.. But I guess you're on to something Link to comment
IIIIlllllIII Posted October 2, 2011 Author Share Posted October 2, 2011 thank you i will test that 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