pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new name[MAX_PLAYER_NAME];
new string[256];
//new dmessage[128];
//new deathreason[20];
new playercash;
new victimteam;
new Float:px,Float:py,Float:pz;
new killerteam;
victimteam = gTeam[playerid];
killerteam = gTeam[killerid];
Soga[playerid] = 0;
Alambre[playerid] = 0;
Pastel[playerid] = 0;
Pavo[playerid] = 0;
Fideo[playerid] = 0;
Milanesa[playerid] = 0;
Papas[playerid] = 0;
Bistec[playerid] = 0;
Cuchilla[playerid] = 0;
gPlayerSpawned[playerid] = 0;
// Street Life: Sistema de Cinturon
PlayerInfo[playerid][pCinturon] = 0;
//****************************************
PlayerInfo[playerid][pInvWeapon] = 0;
PlayerInfo[playerid][pInvAmmo] = 0;
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[playerid][pLocal] = 255;
GetPlayerPos(playerid, px, py, pz);
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
if(ProxDetectorS(20, killerid, playerid))
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2)
{
SendClientMessage(killerid, COLOR_YELLOW, "Has realizado Drive by... si lo vuelves a hacer seras sancionado.");
return 1;
}
SetPlayerCriminal(killerid,255,"Homisidio");
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
return 1;
}
}
}
}
if (PlayerInfo[killerid][pAdmin] < 1)
{
if(reason == 38)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "AdmWarning: [%d]%s Mato a [%d]%s Con minugin, Verifique posible cheat.",killerid,kickname,playerid,name);
ABroadCast(COLOR_LIGHTRED,string,1);
printf("%s", kstring);
//Ban(killerid);
}
}
if(reason == 35)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "AdmWarning: [%d]%s Ha matado a un jugador con Lansallamas, El Jugador fue baneado.",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf("%s", kstring);
Ban(killerid);
}
}
if(reason == 9)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "AdmWarning: [%d]%s Ha matado a un jugador con Motosierra, El Jugador fue baneado.",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf("%s", kstring);
Ban(killerid);
}
}
if(reason == 16)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "AdmWarning: [%d]%s Ha matado a un jugador con Granadas, El Jugador fue baneado.",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf("%s", kstring);
Ban(killerid);
}
}
if(reason == 18)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "AdmWarning: [%d]%s Ha matado a un jugador con Molotov, El Jugador fue baneado.",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf("%s", kstring);
Ban(killerid);
}
}
if(reason == 28)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "AdmWarning: [%d]%s Ha matado a un jugador con Mac 10, El Jugador fue baneado.",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf("%s", kstring);
}
}
if(reason == 32)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "AdmWarning: [%d]%s Ha matado a un jugador con Tec 9, El Jugador fue baneado.",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf("%s", kstring);
}
}
if(reason == 36)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "AdmWarning: [%d]%s Ha matado a un jugador con Lansa Misiles, El Jugador fue baneado.",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf("%s", kstring);
Ban(killerid);
}
}
}
if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
}
new caller = Mobile[playerid];
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller, COLOR_GRAD2, " The line just went dead....");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
}
ClearCrime(playerid);
if(PlayerPaintballing[playerid] != 0)
{
PlayerPaintballKills[killerid] ++;
if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
{
new killer[MAX_PLAYER_NAME];
PaintballWinner = killerid;
PaintballWinnerKills = PlayerPaintballKills[killerid];
GetPlayerName(killerid, killer, sizeof(killer));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerPaintballing[i] != 0)
{
format(string, sizeof(string), "* %s esta a la cabeza con %d asesinatos.",killer,PaintballWinnerKills);
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
}
return 1;