13.03.2013, 23:56
(
Последний раз редактировалось Ananisiki; 15.12.2013 в 18:09.
)
^^^^^^^^
public OnPlayerDeath(playerid, killerid, reason)
{
SetPVarInt(playerid, "Dead", 1);
if(GetPVarInt(killerid, "Aduty") == 1 && GetPVarInt(playerid, "SetHealthDead") == 0 && GetPVarInt(playerid, "akilled") == 0)
{
GameTextForPlayer(playerid, "~g~unfair death~n~~p~continuing current life", 3000, 3);
SetPlayerColor(playerid, COLOR_GREY);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new kName[128];
new string[503];
SetPlayerScore(playerid, GetPlayerScore(playerid) -1);
SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
KillingSpree[killerid] ++;
KillingSpree[playerid] = 0;
if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
{
new WeapName[32],Name[MAX_PLAYER_NAME],KillerName[MAX_PLAYER_NAME];
GetWeaponName(reason, WeapName, sizeof(WeapName));
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
GetPlayerName(killerid, KillerName, MAX_PLAYER_NAME);
format(string,sizeof(string),"%s Has Killed %s With A %s. ",KillerName, Name,WeapName);
SendClientMessageToAll(-1, string);
}
if(KillingSpree[killerid] == 3)
{
format(string, sizeof(string), "%s (%d) Is On A 3 Killing Spree!", PlayerName(killerid), killerid);
SendClientMessageToAll (COLOR_YELLOW, string);
GivePlayerMoney(killerid, 3500);
}
if(KillingSpree[killerid] == 5)
{
format(string, sizeof(string), "%s (%d) Is On A 5 Killing Spree!", PlayerName(killerid), killerid);
SendClientMessageToAll (COLOR_YELLOW, string);
GivePlayerMoney(killerid, 5500);
}
if(KillingSpree[killerid] == 10)
{
format(string, sizeof(string), "%s (%d) Is Klapping Niggaz, 10 Killing Spree!", PlayerName(killerid), killerid);
SendClientMessageToAll (COLOR_YELLOW, string);
GivePlayerMoney(killerid, 10500);
}
if(KillingSpree[killerid] == 15)
{
format(string, sizeof(string), "%s (%d) Is Unstopable, 15 Killing Spree!", PlayerName(killerid), killerid);
SendClientMessageToAll (COLOR_YELLOW, string);
GivePlayerMoney(killerid, 12500);
}
if(KillingSpree[killerid] == 20)
{
format(string, sizeof(string), "%s (%d) Is Dominating, 20 Killing Spree!", PlayerName(killerid), killerid);
SendClientMessageToAll (COLOR_YELLOW, string);
GivePlayerMoney(killerid, 15500);
}
if(KillingSpree[killerid] == 25)
{
format(string, sizeof(string), "%s (%d) Is Legendary 25 Killing Spree!", PlayerName(killerid), killerid);
SendClientMessageToAll (COLOR_YELLOW, string);
GivePlayerMoney(killerid, 20500);
}
GivePlayerMoney(killerid, 1000);
isDead[playerid] = 1;
if(GetPVarInt(playerid, "akilled") == 0)
SetPVarInt(playerid, "akilled", 0);
SetPVarInt(playerid,"PillsTaken",0);
// GameTextForPlayer(playerid, "~r~klapped", 3000, 6);
GetPlayerName(killerid, kName, sizeof(kName));
PlayerKills[killerid] = PlayerKills[killerid] +1;
PlayerKills[playerid] = 0;
SetPVarInt(playerid, "Dead", 1);
if(GetPVarInt(killerid, "Aduty") == 1 && GetPVarInt(playerid, "SetHealthDead") == 0 && GetPVarInt(playerid, "akilled") == 0)
{
GameTextForPlayer(playerid, "~g~unfair death~n~~p~continuing current life", 3000, 3);
SetPlayerColor(playerid, COLOR_GREY);
return 1;
}
return 1;
}