pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerHealth(playerid,0);
new nome[MAX_PLAYER_NAME], nome2[MAX_PLAYER_NAME],string[256];
GetPlayerName(playerid, nome, sizeof(nome));
GetPlayerName(killerid, nome2, sizeof(nome2));
if(PX1 == 2 && GetPVarInt(playerid, "TipoX1") == 1 && GetPVarInt(killerid, "TipoX1") == 1){
if(killerid == INVALID_PLAYER_ID)
format(string,sizeof(string),"[X1W] '%s' se matou no x1 Walk.(/x1w)",nome);
else
format(string,sizeof(string),"[X1W] '%s' matou '%s' no x1 Walk.(/x1w)",nome2, nome);
SendClientMessageToAll(COLOR_YELLOW, string);
PX1 = 0;
SetPVarInt(killerid,"TipoX1",0);
SetPVarInt(playerid,"TipoX1",0);
SpawnPlayer(killerid);
SetPVarInt(killerid,"Bloqueio",0);
SetPVarInt(playerid,"Bloqueio",0);
}
if(PX2 == 2 && GetPVarInt(playerid, "TipoX1") == 2 && GetPVarInt(killerid, "TipoX1") == 2){
if(killerid == INVALID_PLAYER_ID)
format(string,sizeof(string),"[X1R] '%s' se matou no x1 Run.(/x1r)",nome);
}
else
{
format(string,sizeof(string),"[X1R] '%s' matou '%s' no x1 Run.(/x1r)",nome2, nome);
SendClientMessageToAll(COLOR_YELLOW, string);
PX2 = 0;
SetPVarInt(killerid,"TipoX1",0);
SetPVarInt(playerid,"TipoX1",0);
SpawnPlayer(killerid);
SetPVarInt(killerid,"Bloqueio",0);
SetPVarInt(playerid,"Bloqueio",0);
}
if(GetPVarInt(playerid, "Sniper") == 1 && GetPVarInt(killerid, "Sniper") == 1){
if(killerid == INVALID_PLAYER_ID)
format(string,sizeof(string),"[SNIPER] '%s' se matou no Sniper.(/sniper)",nome);
}
else
{
format(string,sizeof(string),"[SNIPER] '%s' matou '%s' na Arena Sniper(/sniper)",nome2, nome);
SendClientMessageToAll(COLOR_YELLOW, string);
SendClientMessage(killerid,COLOR_GREEN,"[INFO]Vocк Ganhou Colete e Vida!");
GameTextForPlayer(killerid,"Parabens",3000,4);
SetPlayerHealth(killerid,100);
SetPlayerArmour(killerid,100);
SetPVarInt(playerid,"Sniper",0);
SetPVarInt(playerid,"Bloqueio",0);
}
SendDeathMessage(killerid,playerid,reason);
SetPlayerVirtualWorld(playerid,0);
SetPVarInt(playerid,"Bloqueio",0);
return 1;
}