Karuzo Posted January 11, 2014 Share 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 ? Link to comment
Drakath Posted January 11, 2014 Share Posted January 11, 2014 function godmode () cancelEvent() end addEventHandler("onClientPlayerDamage", godmode) Link to comment
Karuzo Posted January 11, 2014 Author Share 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. Link to comment
Castillo Posted January 11, 2014 Share Posted January 11, 2014 Add the event handler when the player presses the button. Link to comment
Karuzo Posted January 11, 2014 Author Share Posted January 11, 2014 Just like that ? function godmode () cancelEvent() addEventHandler("onClientPlayerDamage", godmode) end addEventHandler("onClientGUIClick", VIP.button[5], godmode) Link to comment
Castillo Posted January 11, 2014 Share Posted January 11, 2014 No, like this: function godmode ( ) cancelEvent ( ) end addEventHandler ( "onClientGUIClick", VIP.button[5], function ( ) addEventHandler ( "onClientPlayerDamage", localPlayer, godmode ) end ,false ) Link to comment
Karuzo Posted January 11, 2014 Author Share Posted January 11, 2014 ok thank you i will try it out 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