public OnPlayerDeath(playerid, killerid, reason) { #if defined DEBUG printf("[debug] (%d, %d, %d)", playerid, killerid, reason); #endif if(killerid != INVALID_PLAYER_ID) { new turfkiller, turfplayerid; if(PlayerPaintballing[playerid] != 0) { if(pTeam[playerid] != pTeam[killerid]) { if(pTeam[playerid] == 1) { TeamScore2++; } if(pTeam[playerid] == 2) { TeamScore1++; } new string[500]; KillP[killerid]++; format(string, sizeof(string), "You have killed %s. You now have %d kills.",playerVariables[playerid][pNormalName], KillP[killerid]); SendClientMessage(killerid, COLOR_GENANNOUNCE, string); format(string, sizeof(string), "You have been killed by %s.",playerVariables[killerid][pNormalName]); SendClientMessage(playerid, COLOR_GENANNOUNCE, string); PaintKillStreak[killerid]++; PaintKillStreak[playerid] = 0; foreach(Player, x) { if(PlayerPaintballing[x] == 1) { if(PaintKillStreak[killerid] == 2) { format(string, sizeof(string), "~y~%s~w~ double kill!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(PaintKillStreak[killerid] == 3) { format(string, sizeof(string), "~y~%s~w~ hattrick!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(PaintKillStreak[killerid] == 4) { format(string, sizeof(string), "~y~%s~w~ poker!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(PaintKillStreak[killerid] == 6) { format(string, sizeof(string), "~y~%s~w~ godlike!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(PaintKillStreak[killerid] == 8) { format(string, sizeof(string), "~y~%s~w~ rampage!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } SendDeathMessageToPlayer(x, killerid, playerid, reason); } } return 1; } } public OnPlayerDeath(playerid, killerid, reason) { #if defined DEBUG printf("[debug] (%d, %d, %d)", playerid, killerid, reason); #endif if(killerid != INVALID_PLAYER_ID) { new turfkiller, turfplayerid; if(PlayerPaintballing[playerid] != 0) { if(pTeam[playerid] != pTeam[killerid]) { if(pTeam[playerid] == 1) { TeamScore2++; } if(pTeam[playerid] == 2) { TeamScore1++; } new string[500]; KillP[killerid]++; format(string, sizeof(string), "You have killed %s. You now have %d kills.",playerVariables[playerid][pNormalName], KillP[killerid]); SendClientMessage(killerid, COLOR_GENANNOUNCE, string); format(string, sizeof(string), "You have been killed by %s.",playerVariables[killerid][pNormalName]); SendClientMessage(playerid, COLOR_GENANNOUNCE, string); PaintKillStreak[killerid]++; PaintKillStreak[playerid] = 0; foreach(Player, x) { if(PlayerPaintballing[x] == 1) { if(PaintKillStreak[killerid] == 2) { format(string, sizeof(string), "~y~%s~w~ double kill!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(PaintKillStreak[killerid] == 3) { format(string, sizeof(string), "~y~%s~w~ hattrick!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(PaintKillStreak[killerid] == 4) { format(string, sizeof(string), "~y~%s~w~ poker!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(PaintKillStreak[killerid] == 6) { format(string, sizeof(string), "~y~%s~w~ godlike!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(PaintKillStreak[killerid] == 8) { format(string, sizeof(string), "~y~%s~w~ rampage!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } SendDeathMessageToPlayer(x, killerid, playerid, reason); } } return 1; } }
if(dDrugsTime[playerid] >= 1) { SendClientMessage(playerid, -1, "You have failed to take the drugs."); dDrugsTime[playerid] = 0; ClearAnimations(playerid); playerVariables[playerid][pFreezeType] = 0; playerVariables[playerid][pFreezeTime] = 0; } if(playerVariables[killerid][pGroup] == 4) { if(Hit[killerid] == playerid) { new Float: dist = GetDistanceBetweenPlayers(playerid, killerid); playerVariables[killerid][pMoney] += playerVariables[playerid][pHeadValue]; Hitman[playerid] = -1; Hit[killerid] = -1; format(szMessage, sizeof(szMessage), "[AGENCY NEWS] %s finished the contract on %s and received $%s. Distance: %.0f", playerVariables[killerid][pNormalName], playerVariables[playerid][pNormalName], NumberFormat(playerVariables[playerid][pHeadValue]), dist); SendToGroup(4, COLOR_RADIOCHAT, szMessage); playerVariables[playerid][pHeadValue] = 0; playerVariables[playerid][pCheckpoint] = 0; DisablePlayerCheckpoint(playerid); FindedPlayer[playerid] = -1; } } new string[256]; if((playerVariables[playerid][pGroup] != 1 && playerVariables[playerid][pGroup] != 10) && (groupVariables[playerVariables[killerid][pGroup]][gInWar] == 0 || groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0) && (PlayerPaintballing[killerid] == 0 && PlayerPaintballing[playerid] == 0) && (playerVariables[killerid][pGroup] != 10 && playerVariables[killerid][pGroup] != 1) && (playerVariables[killerid][pGroup] != playerVariables[playerid][pGroup])) { WantedID[playerid] = killerid; SCM(playerid, COLOR_TEAL, "You have been attacked by another player. You have 60 seconds to call the police to report this crime. Use /call 112."); WantedIDTime[playerid] = 60; } if((playerVariables[playerid][pGroup] == 5 || playerVariables[playerid][pGroup] == 6 || playerVariables[playerid][pGroup] == 8 || playerVariables[playerid][pGroup] == 9 || playerVariables[playerid][pGroup] == 14 || playerVariables[playerid][pGroup] == 15) && (playerVariables[killerid][pGroup] == 5 || playerVariables[killerid][pGroup] == 6 || playerVariables[killerid][pGroup] == 8 || playerVariables[killerid][pGroup] == 9 || playerVariables[playerid][pGroup] == 14 || playerVariables[playerid][pGroup] == 15)) { for(new i = 1; i <= sizeof(TurfInfo)-1; i++) { if(IsPlayerInTurf(playerid, i) == 1) { turfplayerid = i; break; } } for(new i = 1; i <= sizeof(TurfInfo)-1; i++) { if(IsPlayerInTurf(killerid, i) == 1) { turfkiller = i; break; } } if(WarInfo[turfplayerid][wTime] > 0 && WarInfo[turfkiller][wTime] > 0) { if(turfplayerid == turfkiller) { if(playerVariables[playerid][pGroup] == WarInfo[turfplayerid][wAttacker] && playerVariables[killerid][pGroup] == WarInfo[turfplayerid][wFaction]) { playerVariables[playerid][pWarDeaths] += 1; new Float: dist2; dist2 = GetDistanceBetweenPlayers(playerid, killerid); format(string, sizeof(string), "%s(%d) has killed you from %.0f meters.", playerVariables[killerid][pNormalName], killerid, dist2); SCM(playerid, COLOR_GENANNOUNCE, string); groupVariables[WarInfo[turfkiller][wFaction]][gScore] += 1; playerVariables[killerid][pWarScore] += 1; new Float: dist; dist = GetDistanceBetweenPlayers(killerid, playerid); format(string, sizeof(string), "You have killed %s(%d) from %.0f meters.", playerVariables[playerid][pNormalName], playerid, dist); SCM(killerid, COLOR_GENANNOUNCE, string); playerVariables[killerid][pWarKillStreak]++; playerVariables[playerid][pWarKillStreak] = 0; foreach(Player, x) { if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction]) { if(playerVariables[killerid][pWarKillStreak] == 2) { format(string, sizeof(string), "~y~%s~w~ double kill!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(playerVariables[killerid][pWarKillStreak] == 3) { format(string, sizeof(string), "~y~%s~w~ hattrick!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(playerVariables[killerid][pWarKillStreak] == 4) { format(string, sizeof(string), "~y~%s~w~ poker!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(playerVariables[killerid][pWarKillStreak] == 6) { format(string, sizeof(string), "~y~%s~w~ godlike!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(playerVariables[killerid][pWarKillStreak] == 8) { format(string, sizeof(string), "~y~%s~w~ rampage!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } SendDeathMessageToPlayer(x, killerid, playerid, reason); } } SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in the HQ."); } else if(playerVariables[killerid][pGroup] == WarInfo[turfkiller][wAttacker] && playerVariables[playerid][pGroup] == WarInfo[turfkiller][wFaction]) { playerVariables[playerid][pWarDeaths] += 1; new Float: dist2; dist2 = GetDistanceBetweenPlayers(playerid, killerid); format(string, sizeof(string), "%s(%d) has killed you from %.0f meters.", playerVariables[killerid][pNormalName], killerid, dist2); SCM(playerid, COLOR_GENANNOUNCE, string); new Float: dist; dist = GetDistanceBetweenPlayers(killerid, playerid); groupVariables[WarInfo[turfkiller][wAttacker]][gScore] += 1; playerVariables[killerid][pWarScore] += 1; format(string, sizeof(string), "You have killed %s(%d) from %.0f meters", playerVariables[playerid][pNormalName], playerid, dist); SCM(killerid, COLOR_GENANNOUNCE, string); playerVariables[killerid][pWarKillStreak]++; playerVariables[playerid][pWarKillStreak] = 0; foreach(Player, x) { if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction]) { if(playerVariables[killerid][pWarKillStreak] == 2) { format(string, sizeof(string), "~y~%s~w~ double kill!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(playerVariables[killerid][pWarKillStreak] == 3) { format(string, sizeof(string), "~y~%s~w~ hattrick!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(playerVariables[killerid][pWarKillStreak] == 4) { format(string, sizeof(string), "~y~%s~w~ poker!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(playerVariables[killerid][pWarKillStreak] == 6) { format(string, sizeof(string), "~y~%s~w~ godlike!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } else if(playerVariables[killerid][pWarKillStreak] == 8) { format(string, sizeof(string), "~y~%s~w~ rampage!", playerVariables[killerid][pNormalName]); GameTextForPlayer(x, string, 3000, 4); } SendDeathMessageToPlayer(x, killerid, playerid, reason); } } SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in the HQ."); } } } } } return 1; }