Karuzo Posted January 11, 2014 Posted January 11, 2014 hey guys , i want to give a vip player godmode if he clicked on the Button , but i don't know how cause i don't know how i should put cancelEvent and onClientPlayerDamage in my "onClientGUIClick" Function. Any ideas ?
Drakath Posted January 11, 2014 Posted January 11, 2014 function godmode () cancelEvent() end addEventHandler("onClientPlayerDamage", godmode)
Karuzo Posted January 11, 2014 Author Posted January 11, 2014 function godmode () cancelEvent() end addEventHandler("onClientPlayerDamage", godmode) Hi i know that. but i want it to enable the godmode if the player presses a button.
Castillo Posted January 11, 2014 Posted January 11, 2014 Add the event handler when the player presses the button.
Karuzo Posted January 11, 2014 Author Posted January 11, 2014 Just like that ? function godmode () cancelEvent() addEventHandler("onClientPlayerDamage", godmode) end addEventHandler("onClientGUIClick", VIP.button[5], godmode)
Castillo Posted January 11, 2014 Posted January 11, 2014 No, like this: function godmode ( ) cancelEvent ( ) end addEventHandler ( "onClientGUIClick", VIP.button[5], function ( ) addEventHandler ( "onClientPlayerDamage", localPlayer, godmode ) end ,false )
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