14.11.2011, 18:45
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid,playerid,reason);
if(gTeam[killerid] == TEAM_ZOMBIE && gTeam[playerid] == TEAM_HUMAN)
{
GivePlayerMoney(killerid, 5000);
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
GameTextForPlayer(killerid,"~w~+1 UP ~n~~r~+$5000",6000,4);
SetPlayerColor(playerid,ADMIN_RED);
gTeam[playerid] = TEAM_ZOMBIE;
SendClientMessage(playerid,GREEN,"~Vocк foi Infectado~");
SendClientMessageToAll(0xFF0000FF,"Um ser Humano foi Infectado");
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
return 1;
}
else if(gTeam[killerid] == TEAM_HUMAN && gTeam[playerid] == TEAM_ZOMBIE)
{
GivePlayerMoney(killerid, 5000);
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
GameTextForPlayer(killerid,"~w~+1 Up ~n~~r~+$5000",6000,4);
SetPlayerColor(playerid, GREEN);
gTeam[killerid] = TEAM_ZOMBIE;
SendClientMessage(playerid,ADMIN_RED,"Vocк foi morto");
SendClientMessageToAll( 0x00FF00FF,"Um Zombie foi morto");
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
}
return 1;
}