30.10.2010, 17:32
Well, i've scripted this:
The trouble is when it reaches 3 - 5 or even 10, it shows that the killed player has a killing spree, does anyone know why this is actually happening?
Thanks
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{ Killsprees[killerid] ++;
Killsprees[playerid] = 0;
if(Killsprees[killerid] == 3)
{
new pname2[MAX_PLAYER_NAME],string[22+ MAX_PLAYER_NAME];
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s Is on a killing spree of 3",pname2);
SendClientMessageToAll(Streakcolor,string);
}
if(Killsprees[killerid] == 5)
{
new pname2[MAX_PLAYER_NAME],string[22+ MAX_PLAYER_NAME];
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s Is on a killing spree of 5",pname2);
SendClientMessageToAll(Streakcolor,string);
}
if(Killsprees[killerid] == 10)
{
new pname2[MAX_PLAYER_NAME],string[22+ MAX_PLAYER_NAME];
GetPlayerName(playerid,pname2,sizeof(pname2));
format(string,sizeof(string),"%s Is on a killing spree of 10!",pname2);
SendClientMessageToAll(Streakcolor,string);
}
return 1;
}
Thanks