Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[256],gunname[32];
SendDeathMessage(killerid, playerid, reason);
playersAliveCount--;
pInfo[playerid][pDeaths]++;
pInfo[playerid][Killstreak] = 0;
if(pInfo[playerid][IsPlayerInfected] == 1)
{
ZombieSetup(playerid);
CurePlayer(playerid);
printf("Infected human works!");
}
if(team[playerid] == TEAM_HUMAN)
{
ZombieSetup(playerid);
printf("Suicide human works!");
}
pInfo[killerid][pKills]++;
pInfo[killerid][Killstreak]++;
pInfo[playerid][pDeaths]++;
pInfo[playerid][Killstreak] = 0;
switch(Map[XPType])
{
case 1:
{
switch(random(2))
{
case 0: GivePlayerXP(killerid,2);
case 1: GivePlayerXP(killerid,2);
}
}
case 2:
{
switch(random(2))
{
case 0: GivePlayerXP(killerid,4);
case 1: GivePlayerXP(killerid,4);
}
}
case 3:
{
switch(random(2))
{
case 0: GivePlayerXP(killerid,6);
case 1: GivePlayerXP(killerid,6);
}
}
case 4:
{
switch(random(2))
{
case 0: GivePlayerXP(killerid,8);
case 1: GivePlayerXP(killerid,8);
}
}
}
if(pInfo[killerid][pVipLevel] >= 1)
{
switch(Map[XPType])
{
case 1:
{
switch(random(2))
{
case 0: GivePlayerXP(killerid,15),SendClientMessage(killerid,-1,""chat" Earned 15 XP from VIP Double XP! + normal xp 10 = 25 xp total");
case 1: GivePlayerXP(killerid,25),SendClientMessage(killerid,-1,""chat" Earned 25 XP from VIP Double XP! + normal xp 20 = 45 xp total");
}
}
case 2:
{
switch(random(2))
{
case 0: GivePlayerXP(killerid,25),SendClientMessage(killerid,-1,""chat" Earned 25 XP from VIP Double XP! + double xp 20 = 45 xp total");
case 1: GivePlayerXP(killerid,35),SendClientMessage(killerid,-1,""chat" Earned 35 XP from VIP Double XP! + double xp 30 = 65 xp total");
}
}
case 3:
{
switch(random(2))
{
case 0: GivePlayerXP(killerid,35),SendClientMessage(killerid,-1,""chat" Earned 35 XP from VIP Double XP! + triple xp 30 = 65 xp total");
case 1: GivePlayerXP(killerid,45),SendClientMessage(killerid,-1,""chat" Earned 45 XP from VIP Double XP! + triple xp 40 = 85 xp total");
}
}
case 4:
{
switch(random(2))
{
case 0: GivePlayerXP(killerid,55),SendClientMessage(killerid,-1,""chat" Earned 55 XP from VIP Double XP! + quad xp 40 = 95 xp total");
case 1: GivePlayerXP(killerid,65),SendClientMessage(killerid,-1,""chat" Earned 65 XP from VIP Double XP! + quad xp 50 = 115 xp total");
}
}
}
}
if(team[killerid] == TEAM_ZOMBIE)
{
if(reason == 9)
{
ZombieSetup(playerid);
printf("Zombie killed human works");
}
}
KillTimer(pInfo[playerid][IsPlayerInfectedTimer]);
GetWeaponName(reason,gunname,sizeof(gunname));
format(string,sizeof(string),"Tu nuzudei~r~ %s~w~ su %s",PlayerName(playerid),gunname);
TextDrawSetString(iKilled[killerid],string);
TextDrawShowForPlayer(killerid, iKilled[killerid]);
SetTimerEx("HideiKilled", 3000, 0, "i", killerid);
if(killerid != INVALID_PLAYER_ID)
{
if(!PlayerShotPlayer[killerid][playerid])
{
new Admin[24] = "Anti-cheat";
new reason3[128] = "Fake Killing";
BanPlayer(playerid,reason3,Admin);
}
}
foreach(Player,i)
{
PlayerShotPlayer[i][playerid] = 0;
}
new Float:x,Float:y,Float:z;
if(team[playerid] == TEAM_ZOMBIE)
{
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
meatDrops[playerid] = CreatePickup(2804,19,Float:x,Float:y,Float:z,0);
if(pInfo[playerid][pZombieClass] == BOOMERZOMBIE)
{
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
CreateExplosion(Float:x,Float:y,Float:z,0,6.0);
foreach(Player,i)
{
GetClosestPlayer(i);
if(IsPlayerConnected(i))
{
switch(GetPlayerSkin(i))
{
case NON_IMMUNE:
{
if(IsPlayerInRangeOfPoint(i,7.0,Float:x,Float:y,Float:z))
{
if(pInfo[i][IsPlayerInfected] == 0)
{
InfectPlayerStandard(i);
}
}
}
}
}
}
}
}
new kstring[256];
switch(pInfo[killerid][Killstreak])
{
case 5: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 5 nuzudymus per viena gyvybe "COL_WHITE"(+5 XP) (1 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 5,pInfo[killerid][pCoins] += 1;
case 10: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 10 nuzudymus per viena gyvybe "COL_WHITE"(+10 XP) (2 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 10,pInfo[killerid][pCoins] += 2;
case 15: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 15 nuzudymus per viena gyvybe "COL_WHITE"(+15 XP) (3 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 15,pInfo[killerid][pCoins] += 3;
case 20: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 20 nuzudymus per viena gyvybe "COL_WHITE"(+20 XP) (4 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 20,pInfo[killerid][pCoins] += 4;
case 25: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 25 nuzudymus per viena gyvybe "COL_WHITE"(+25 XP) (5 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 25,pInfo[killerid][pCoins] += 5;
case 30: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 30 nuzudymus per viena gyvybe "COL_WHITE"(+30 XP) (6 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 30,pInfo[killerid][pCoins] += 6;
case 35: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 35 nuzudymus per viena gyvybe "COL_WHITE"(+35 XP) (7 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 35,pInfo[killerid][pCoins] += 7;
case 40: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 40 nuzudymus per viena gyvybe "COL_WHITE"(+40 XP) (8 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 40,pInfo[killerid][pCoins] += 8;
case 45: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 45 nuzudymus per viena gyvybe "COL_WHITE"(+45 XP) (9 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 45,pInfo[killerid][pCoins] += 9;
case 50: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 50 nuzudymus per viena gyvybe "COL_WHITE"(+50 XP) (10 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 50,pInfo[killerid][pCoins] += 10;
case 55: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 55 nuzudymus per viena gyvybe "COL_WHITE"(+55 XP) (11 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 55,pInfo[killerid][pCoins] += 11;
case 60: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 60 nuzudymus per viena gyvybe "COL_WHITE"(+60 XP) (12 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 60,pInfo[killerid][pCoins] += 12;
case 65: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 65 nuzudymus per viena gyvybe "COL_WHITE"(+65 XP) (13 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 65,pInfo[killerid][pCoins] += 13;
case 70: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 70 nuzudymus per viena gyvybe "COL_WHITE"(+70 XP) (14 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 70,pInfo[killerid][pCoins] += 14;
case 75: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 75 nuzudymus per viena gyvybe "COL_WHITE"(+75 XP) (15 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 75,pInfo[killerid][pCoins] += 15;
case 80: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 80 nuzudymus per viena gyvybe "COL_WHITE"(+80 XP) (16 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 80,pInfo[killerid][pCoins] += 16;
case 85: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 85 nuzudymus per viena gyvybe "COL_WHITE"(+85 XP) (17 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 85,pInfo[killerid][pCoins] += 17;
case 90: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 90 nuzudymus per viena gyvybe "COL_WHITE"(+90 XP) (18 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 90,pInfo[killerid][pCoins] += 18;
case 95: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 95 nuzudymus per viena gyvybe "COL_WHITE"(+95 XP) (19 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 95,pInfo[killerid][pCoins] += 19;
case 100: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 100 nuzudymus per viena gyvybe "COL_WHITE"(+100 XP) (20 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 100,pInfo[killerid][pCoins] += 20;
case 105: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 105 nuzudymus per viena gyvybe "COL_WHITE"(+105 XP) (21 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 105,pInfo[killerid][pCoins] += 21;
case 110: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 110 nuzudymus per viena gyvybe "COL_WHITE"(+110 XP) (22 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 110,pInfo[killerid][pCoins] += 22;
case 115: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 115 nuzudymus per viena gyvybe "COL_WHITE"(+115 XP) (23 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 115,pInfo[killerid][pCoins] += 23;
case 120: format(kstring,sizeof(kstring),""chat""COL_PINK" %s Pasieke 120 nuzudymus per viena gyvybe "COL_WHITE"(+120 XP) (24 auksiniai)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 120,pInfo[killerid][pCoins] += 24;
}
if(team[killerid] == TEAM_HUMAN)
{
if(GetPlayerSkin(killerid) == 0)
{
new Admin[24] = "Anti-cheat";
new reason3[128] = "Skin Hack (SI 0)";
BanPlayer(killerid,reason3,Admin);
}
}
hideTextdrawsAfterConnect(playerid);
CheckToLevelOrRankUp(killerid);
return 1;
}