Jump to content

fix this pleez a small problem


Recommended Posts

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

8)

Link to comment

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...