2020-10-16, 06:09 AM
Is this correct? is the stock for the name ok? pname
Code:
public OnPlayerDeath(playerid, killerid, reason)
{
? ? new string[128];
? ? KillSpree[playerid] = 0;
? ? if(killerid!=INVALID_PLAYER_ID)
? ? {
switch(KillSpree[killerid])
{
? ? case 4:
{
? format(string, sizeof(string), "*%s Dominating with %d Kills", pname, KillSpree[killerid]);
? SendClientMessageToAll(COLOR_ORANGE, string);
}
case 6:
{
format(string, sizeof(string), "*%s Rampage with %d Kills", pname, KillSpree[killerid]);
? SendClientMessageToAll(COLOR_ORANGE, string);
}
case 8:
{
format(string, sizeof(string), "*%s Killing Spree with %d Kills", pname, KillSpree[killerid]);
SendClientMessageToAll(COLOR_ORANGE, string);
}
case 10:
{
format(string, sizeof(string), "*%s Monster Kill with %d Kills", pname, KillSpree[killerid]);
? SendClientMessageToAll(COLOR_ORANGE, string);
}
case 12:
{
format(string, sizeof(string), "*%s Unstoppable with %d Kills", pname, KillSpree[killerid]);
? SendClientMessageToAll(COLOR_ORANGE, string);
}
case 14:
{
format(string, sizeof(string), "*%s Ultra Kill with %d Kills", pname, KillSpree[killerid]);
SendClientMessageToAll(COLOR_ORANGE, string);
}
case 16:
{
format(string, sizeof(string), "*%s Godlike with %d Kills", pname, KillSpree[killerid]);
SendClientMessageToAll(COLOR_ORANGE, string);
}
case 18:
{
? format(string, sizeof(string), "*%s Wicked Sick with %d Kills", pname, KillSpree[killerid]);
? SendClientMessageToAll(COLOR_ORANGE, string);
}
case 20:
{
format(string, sizeof(string), "*%s Ludacriss Kill with %d Kills", pname, KillSpree[killerid]);
SendClientMessageToAll(COLOR_ORANGE, string);
}
case 22:
{
format(string, sizeof(string), "*%s Holy Shit with %d Kills", pname, KillSpree[killerid]);
SendClientMessageToAll(COLOR_ORANGE, string);
}
}
stock pname(playerid)
{
? new plname[MAX_PLAYER_NAME];
? GetPlayerName(playerid, plname, sizeof(plname));
? return plname;
}