micheal1230 Posted May 19, 2012 Share Posted May 19, 2012 Is there A GodMode Function And What Is It? I Cant Find It On the Wiki Link to comment
Castillo Posted May 19, 2012 Share Posted May 19, 2012 You must cancel the event: onClientPlayerDamage with the function: cancelEvent. Link to comment
micheal1230 Posted May 19, 2012 Author Share 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 Link to comment
Castillo Posted May 19, 2012 Share Posted May 19, 2012 You must cancel that event, is not only way. You can use a command handler client side of course. Link to comment
iFoReX Posted May 19, 2012 Share Posted May 19, 2012 I done it for my server addEventHandler("onClientPlayerDamage", getLocalPlayer(), function() cancelEvent() end ) Link to comment
Castillo Posted May 20, 2012 Share Posted May 20, 2012 That's not what he want's, he want's a command to enable/disable God Mode. Link to comment
micheal1230 Posted May 20, 2012 Author Share 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) Link to comment
Castillo Posted May 20, 2012 Share 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 ) Link to comment
Stanley Sathler Posted May 20, 2012 Share 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 Link to comment
Kenix Posted May 20, 2012 Share Posted May 20, 2012 This condition doesn't exists =<Syntax error.It's correct. if weapon >= 0 and weapon <= 40 then 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