ok im creating the Leaderboard + Players Kills but there a problem...
So its worked but after i killing someone its be 1. My Name worked + Kills but see
http://imgur.com/edit?deletehash=Yu2...album_id=nhpvd
I Want after someone killing a player at 2. player[2] - Kills understand me?
PHP Code:
public OnPlayerDeath(playerid, killerid, reason)
{
new
playerKills[MAX_PLAYERS][rankingEnum],
index
;
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
playerKills[index][player_Kills] = GetPlayerScore(i);
playerKills[index++][player_ID] = i;
}
}
GetPlayerHighestKills(playerKills,0, index);
new
kills_Text[256] = "\n",
player_Name[20]
;
for(new i; i< 5; ++i)
{
if(i < index)
{
GetPlayerName(playerKills[i][player_ID], player_Name, sizeof(player_Name));
format(kills_Text, sizeof(kills_Text), "%s\n\n%d. %s - %d", kills_Text, i + 1, player_Name, playerKills[i][player_Kills]);
}
else
format(kills_Text, sizeof(kills_Text), "%s\n%d. N/A", kills_Text, i+ 1);
}
TextDrawSetString(Textdraw19, kills_Text);
TextDrawShowForPlayer(playerid, Textdraw19);
TextDrawShowForPlayer(playerid, Textdraw20);
TextDrawShowForPlayer(playerid, Textdraw21);
TextDrawShowForPlayer(playerid, Textdraw22);
TextDrawShowForPlayer(playerid, Textdraw23);
return 1;
}
http://imgur.com/edit?deletehash=Yu2...album_id=nhpvd
I Want after someone killing a player at 2. player[2] - Kills understand me?