02.03.2010, 14:12
pawn Код:
new Deaths[ MAX_PLAYERS ], Kills[ MAX_PLAYERS ];
public OnPlayerConnect( playerid )
{
Deaths[ playerid] = 0;
Kills[ playerid ] = 0;
return 1;
}
public OnGameModeExit()
{
new string[ 128 ], name[ MAX_PLAYER_NAME ], bestkiller, bestkillerkills;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if( bestkillerkills > Kills[ i ] )
{
bestkiller = i;
bestkillerkills, Kills[ i ]
}
}
GetPlayerName( playerid, name, sizeof( name ) );
format( string, sizeof( string ), "%s has won the round!", name );
SendClientMessageToAll( COLOR, string );
return 1;
}
public OnPlayerDeath( playerid, killerid, reason )
{
Kills[killerid]++;
Deaths[playerid]++;
return 1;
}