14.10.2010, 07:25
(
Последний раз редактировалось <Weponz>; 14.10.2010 в 08:32.
)
Ok i had a code working to show deaths and individual deaths(If u fall/Kill urself),Now i just added a killing spree code to OnPlayerDeath ,It worked fine b4 but now i cant see individual deaths,Killing spree works and normal kills show but individual ones dont :S
Can anyone help me,I think i may have layed it out wrong..
Can anyone help me,I think i may have layed it out wrong..
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
KillingSpree[killerid] ++;
KillingSpree[playerid] = 0;
if(KillingSpree[killerid] == 3)
{
new pname[24];
new string[256];
GetPlayerName(killerid,pname,24);
format(string,sizeof(string), "%s Is On A Killing Spree!(x3)",pname);
SendClientMessageToAll(RED,string);
}
if(KillingSpree[killerid] == 4)
{
new pname[24];
new string[256];
GetPlayerName(killerid,pname,24);
format(string,sizeof(string), "%s Is On A Killing Spree!(x4)",pname);
SendClientMessageToAll(RED,string);
}
if(KillingSpree[killerid] == 5)
{
new pname[24];
new string[256];
GetPlayerName(killerid,pname,24);
format(string,sizeof(string), "%s Is On A Killing Spree!(x5)",pname);
SendClientMessageToAll(RED,string);
}
if(KillingSpree[killerid] == 6)
{
new pname[24];
new string[256];
GetPlayerName(killerid,pname,24);
format(string,sizeof(string), "%s Is On A Killing Spree!(x6)",pname);
SendClientMessageToAll(RED,string);
}
if(KillingSpree[killerid] == 7)
{
new pname[24];
new string[256];
GetPlayerName(killerid,pname,24);
format(string,sizeof(string), "%s Is On A Killing Spree!(x7)",pname);
SendClientMessageToAll(RED,string);
}
if(KillingSpree[killerid] == 8)
{
new pname[24];
new string[256];
GetPlayerName(killerid,pname,24);
format(string,sizeof(string), "%s Is On A Killing Spree!(x8)",pname);
SendClientMessageToAll(RED,string);
}
if(KillingSpree[killerid] == 9)
{
new pname[24];
new string[256];
GetPlayerName(killerid,pname,24);
format(string,sizeof(string), "%s Is On A Killing Spree!(x9)",pname);
SendClientMessageToAll(RED,string);
}
if(KillingSpree[killerid] == 10)
{
new pname[24];
new string[256];
GetPlayerName(killerid,pname,24);
format(string,sizeof(string), "%s Is On A Massive Killing Spree!(x10)!",pname);
SendClientMessageToAll(RED,string);
SendClientMessageToAll(RED, "%s Has Won $1 Million Dollars For A Massive x10 Killing Spree!");
GivePlayerMoney(killerid, 1000000);//End killing spree code
}
else///Added this to see it it helps guide it through but does nothing
if(killerid == INVALID_PLAYER_ID)///Should Be Working But Isnt
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
}
else
{
if(gTeam[killerid] != gTeam[playerid])//Works Fine
{
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid, 1000);
}
else
{
new warning[256];
format(warning, sizeof(warning), "Be Careful! Dont Kill Your Team Mates!");
SendClientMessage(killerid, RED, warning);
SendDeathMessage(killerid,playerid,reason);
GivePlayerMoney(killerid, -5000);
SetPlayerHealth(killerid, 0);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
}
}
return 1;
}



