..:D&G:.. Posted November 20, 2013 Share Posted November 20, 2013 Hello, its me (again ) I am starting to flood a bit with posts, sorry about that, but I started working on some scripts and I don't really know all the functions and events and how to write them (some). So, I want to know how to trigger a command ''/jump for example'' when clicking a button from a gui. Shall I use this: function jumpbabyjump() triggerServerEvent("jump",getLocalPlayer(),getLocalPlayer()) end addEventHandler ( "onClientGUIClick",bJump,jumpbabyjump, false ) or: executeCommandHandler( "jump", jumpbabyjump) Link to comment
glowdemon1 Posted November 20, 2013 Share Posted November 20, 2013 executeCommandHandler would be lots easier, I'd go for that however you'd have to change the arguments possibly because it might not return the correct arguments. You can still add arguments like executeCommandHandler("jump",jumpbabe,thePlayer,theVehicle) etc etc.. Link to comment
xXMADEXx Posted November 20, 2013 Share Posted November 20, 2013 just needs to be the following code, unless you need other arguments, which in this case you don't. executeCommandHandler ( "jump" ) 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