micheal1230 Posted May 19, 2012 Posted May 19, 2012 Is there A GodMode Function And What Is It? I Cant Find It On the Wiki
Castillo Posted May 19, 2012 Posted May 19, 2012 You must cancel the event: onClientPlayerDamage with the function: cancelEvent. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
micheal1230 Posted May 19, 2012 Author Posted May 19, 2012 (edited) You must cancel the event: onClientPlayerDamage with the function: cancelEvent. Is it not possible withaddCommandHandler Edited May 19, 2012 by Guest
Castillo Posted May 19, 2012 Posted May 19, 2012 You must cancel that event, is not only way. You can use a command handler client side of course. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted May 19, 2012 Posted May 19, 2012 I done it for my server addEventHandler("onClientPlayerDamage", getLocalPlayer(), function() cancelEvent() end ) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted May 20, 2012 Posted May 20, 2012 That's not what he want's, he want's a command to enable/disable God Mode. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
micheal1230 Posted May 20, 2012 Author Posted May 20, 2012 Well here is my script to ask you if it will work function togdamage ( attacker, weapon, bodypart ) if ( weapon == 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19 or 20 or 21 or 22 or 23 or 24 or 25 or 26 or 27 or 28 or 29 or 30 or 31 or 32 or 33 or 34 or 35 or 36 or 37 or 38 or 39 or 40 ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), togdamage ) addCommandHandler ("godmode",togdamage)
Castillo Posted May 20, 2012 Posted May 20, 2012 local godModeState = false addCommandHandler ( "godmode", function ( ) godModeState = ( not godModeState ) outputChatBox ( "God Mode is now ".. ( godModeState and "Enabled" or "Disabled" ) ..".", 0, 255, 0 ) end ) function togdamage ( attacker, weapon, bodypart ) if ( godModeState ) then cancelEvent ( ) end end addEventHandler ( "onClientPlayerDamage", localPlayer, togdamage ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Stanley Sathler Posted May 20, 2012 Posted May 20, 2012 if ( weapon == 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19 or 20 or 21 or 22 or 23 or 24 or 25 or 26 or 27 or 28 or 29 or 30 or 31 or 32 or 33 or 34 or 35 or 36 or 37 or 38 or 39 or 40 ) WTF? It will be better, not? if (weapon =< 40) then Software Engineer & Entrepreneur • Running Lustrel and VilarikA • Highly engaged on open source community
Kenix Posted May 20, 2012 Posted May 20, 2012 This condition doesn't exists =<Syntax error.It's correct. if weapon >= 0 and weapon <= 40 then http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
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