06.07.2010, 23:36
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[128],sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
switch(GetPlayerTeam(playerid))
{
case TEAM_HUMAN:
{
format(string, sizeof(string), "News: %s has died and turned into a zombie !", sendername);
SendClientMessageToAll(0xFF0000, string);
SetPlayerTeam(playerid, TEAM_ZOMBIE);
}
case TEAM_ZOMBIE:
{
format(string, sizeof(string), "News: %s has died !", sendername);
SendClientMessageToAll(0xFF0000, string);
}
}
return 1;
}