TheIceman1 Posted March 5, 2013 Share Posted March 5, 2013 Why this dont save me of damage? function godmode() if (getPlayerTeam( localplayer ) == getTeamFromName("Staff") ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", root, godmode ) Link to comment
iPrestege Posted March 5, 2013 Share Posted March 5, 2013 it's localPlayer Not localplayer . Link to comment
Anony# Posted March 5, 2013 Share Posted March 5, 2013 function godmode() if (getPlayerTeam( localPlayer ) == getTeamFromName("Staff") ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", root, godmode ) Link to comment
X-SHADOW Posted March 5, 2013 Share Posted March 5, 2013 (edited) addEventHandler('onClientPlayerDamage', root, function() if(getPlayerTeam(getTeamName( localPlayer ) == ('Staff'))) then cancelEvent( ) end end ) Edited March 5, 2013 by Guest Link to comment
iPrestege Posted March 5, 2013 Share Posted March 5, 2013 His Script Should Work Just Change localplayer to localPlayer ((= Link to comment
X-SHADOW Posted March 5, 2013 Share Posted March 5, 2013 It's Better to Have an Orgnized Code Link to comment
Anderl Posted March 5, 2013 Share Posted March 5, 2013 (edited) addEventHandler('onClientPlayerDamage', root, function() if(getPlayerTeam(getTeamName( localPlayer ) == ('Staff'))) then cancelEvent( ) end end ) It's Better to Have an Orgnized Code I think it's even better not to say anything at all if you don't know, that condition does not make sense. Edited March 5, 2013 by Guest Link to comment
iPrestege Posted March 5, 2013 Share Posted March 5, 2013 addEventHandler('onClientPlayerDamage', root, function() if(getPlayerTeam(getTeamName( localPlayer ) == ('Staff'))) then cancelEvent( ) end end ) It's Better to Have an Orgnized Code I think it's even better to not say anything at all if you don't know, that condition does not make sense. +1 Anderl 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