30.04.2011, 13:01
my kill list does not show when people suicide am i the only one with this problem?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(safeplace[playerid] == 0)
{
if(sw[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "( ! ) You got a bonus for killing a player in ShotgunWar");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +150");
GivePlayerMoney(killerid, 150);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(cw[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "( ! ) You got 175 for killing a player in ChainsawWar");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +175");
GivePlayerMoney(killerid, 175);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(m4w[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "( ! ) You got a bonus for killing a player in M4WAR");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +150");
GivePlayerMoney(killerid, 150);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(mgw[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "( ! ) You got a bonus for killing a player in MinigunWar");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +200");
GivePlayerMoney(killerid, 200);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(fistfight[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "( ! ) You got less for killing a player in Fist fight");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +50");
GivePlayerMoney(killerid, 50);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(dew[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "( ! ) You got a bonus for killing a player in Desert Eagle War");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +250");
GivePlayerMoney(killerid, 50);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(m4w[playerid] == 0 || sw[playerid] == 0 || mgw[playerid] == 0 || fistfight[playerid] == 0 || dew[playerid] == 0 || safeplace[playerid] == 0)
{
SendClientMessage(killerid, COLOR_GREEN, "You just killed a player");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +100");
GivePlayerMoney(killerid, 100);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
wantedlevel = GetPlayerWantedLevel(killerid);
SetPlayerWantedLevel(killerid, wantedlevel+1);
WantedLevel = GetPlayerWantedLevel(playerid);
if(wantedlevel == 5)
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(killerid, name, sizeof(name));
format(string, sizeof(string), "%s is a most wanted player!",name);
SendClientMessageToAll(COLOR_NORMALRED, string);
}
if(WantedLevel == 1)
{
if(killerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_YELLOW, "BABY");
GivePlayerMoney(killerid, 5);
SendClientMessage(killerid, COLOR_GREEN, "( $ ) you got $5 for killing a player with 1 star");
SetPlayerWantedLevel(playerid, 0);
}
else
if(WantedLevel == 2)
{
if(killerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_YELLOW, "BABY");
GivePlayerMoney(killerid, 15);
SendClientMessage(killerid, COLOR_GREEN, "( $ ) you got $15 for killing a player with 2 stars");
SetPlayerWantedLevel(playerid, 0);
}
else
if(WantedLevel == 3)
{
if(killerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_YELLOW, "BABY");
GivePlayerMoney(killerid, 30);
SendClientMessage(killerid, COLOR_GREEN, "( $ ) you got $30 for killing a player with 3 stars");
SetPlayerWantedLevel(playerid, 0);
}
else
if(WantedLevel == 4)
{
if(killerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_YELLOW, "BABY");
GivePlayerMoney(killerid, 60);
SendClientMessage(killerid, COLOR_GREEN, "( $ ) you got $60 for killing a player with 4 stars");
SetPlayerWantedLevel(playerid, 0);
}
else
if(WantedLevel == 5)
{
if(killerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_YELLOW, "BABY");
GivePlayerMoney(killerid, 100);
SendClientMessage(killerid, COLOR_GREEN, "( $ ) you got $100 for killing a player with 5 stars");
SetPlayerWantedLevel(playerid, 0);
}
else
if(WantedLevel > 5)
{
if(killerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_YELLOW, "BABY");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) you got $150 for killing a most wanted player");
GivePlayerMoney(killerid, 150);
SetPlayerWantedLevel(playerid, 0);
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(killerid, name, sizeof(name));
format(string, sizeof(string), "%s killed a most wanted player",name);
SendClientMessageToAll(COLOR_NORMALRED, string);
}
}
else
if(safeplace[playerid] == 1 || safeplace[killerid] == 1)
{
GetPlayerPos(playerid, xs, ys, zs);
GetPlayerFacingAngle(playerid, angs);
if(IsPlayerAdmin(killerid)) return SendClientMessage(killerid, COLOR_NORMALRED, "Killing in safeplace is not allowed!!!");
SendClientMessage(killerid,COLOR_NORMALRED, "You are kicked by the server for: Kill in a Forbidden Place");
Kick(killerid);
}
SendDeathMessage(killerid, playerid, reason);
GivePlayerMoney(playerid, 100);
return 1;
}