How to Get The Highest Kills Of The Player On the Server
#1

What I mean Is something like that

"%s is the Dominating Killer with %d Kills"

Could someone tell me how that's working ?
Reply
#2

well lets say you got this variable for the kills, Kills[MAX_PLAYERS];

youll need to do something like this

pawn Код:
public onplayerdeath(playerid,killerid,reason)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
 if(Kills[killerid] > Kills[i])
 {
 getplayername(killerid, playername, 26);
 format(string,sizeof(string),"%s is dominating with %d kills",playername,Kills[killerid]);
 }
}
This wouldn't work but it is something to show you how to do it
Reply
#3

Thanks, i added it like this
Код:
		for(new i = 0;i < MAX_PLAYERS; i++)
		{
		 if(IsPlayerConnected(i))
		 {
 		 if(BWins[killerid] > BWins[i])
    {
    new killer[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killer,sizeof(killer));
    format(string,sizeof(string),"%s is dominating with %d Wins!",killer,BWins[killerid]);
    SendClientMessageToAll(COLOR_YELLOW,string);
    }
    }
	 }
But I doesn't show the Message =/

Anyone could explain it ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)