14.05.2010, 17:08
The title says it
I would be greatful for you help. =)
I would be greatful for you help. =)
new AliveCount;
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( GetPlayerState( i ) != 7 )
{
AliveCount++;
}
}
every time you want to re-run the code, otherwise it'll pile on to each count, resulting in an inaccurate result.new AliveCount;
if( ! strcmp( cmdtext, "/alivecount", true ) )
{
AliveCount = 0;
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( GetPlayerState( i ) != 7 )
{
AliveCount++;
}
}
}
|
Originally Posted by Freddo [BINMAN
]
pawn Код:
every time you want to re-run the code, otherwise it'll pile on to each count, resulting in an inaccurate result.For example: pawn Код:
|
format(string, sizeof(string), "Players Alive: %s", AliveCount);
TextDrawSetString(Textdraw0, string);
TextDrawShowForAll(Text:Textdraw0);
|
Originally Posted by Killa_
Use %d instead of %s
|