Raised This Month: $ Target: $400
 0% 

set_user_godmode for whole T


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sake
Senior Member
Join Date: Jul 2011
Old 10-04-2011 , 11:56   Re: set_user_godmode for whole T
Reply With Quote #3

Sorry, but what?

This won't work and why should it? if you pass 0 as the first argument to set_user_godmode ALL players will be invulnerable if you check for the team first or not.

PHP Code:
new players[32];
new 
playerCounti;
get_players(playersplayerCount);
for (
i=0i<playerCounti++) 
{
   if(
get_user_team(players[i])==2)
     {
         
set_user_godmode(players[i], 1);
     }

That's how it has to be done. An even better way would be to do sth like get_players(players, playerCount, "e=CT") but I don't know if that would work.

http://www.amxmodx.org/doc/index.htm...er_godmode.htm

EDIT:

"We don't really support get_players() with flags anymore. It was a bad idea and if it was our choice, it would have never been added to the original AMX Mod." - BAILOPAN.

Okay the way that's described above is good .
__________________

Last edited by sake; 10-04-2011 at 17:05.
sake is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode