Your Set Timer Here forward TimerHere(playerid); public TimerHere(playerid) { You will here check if all players are connected { You will now check what players are wanted { You will now check what player has the most wanted points { if a player has the most points you get his ID here { You format a textdraw setting here etc, } } } } } |
forward MaxWanted(playerid);
public MaxWanted(playerid)
{
If(IsPlayerConnected(playerid)
{
if(GetPlayerWantedLevel(playerid) >= 4)
{
if(howtocheck who has the most??)) //<==========
{
//
}
etc...
// List
new count = 0, msg [ 70 ];
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && GetPlayerWantedLevel(playerid) > 5){
format(msg,sizeof(msg),"%d: %s : [Wanted Level: %i]", i,PlayerName(i),GetPlayerWantedLevel(i));
SendClientMessage(playerid, -1, msg);
count++;
}
}
if(count == 0){
SendClientMessage(playerid, -1, "No wanted players at this moment.");
}
//MostWanted
GetMostWantedPlayer()
{
new highPlayerWantedLevel, player = INVALID_PLAYER_ID, wl;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
wl = GetPlayerWantedLevel(i);
if(wl > highPlayerWantedLevel)
{
highPlayerWantedLevel = wl, player = i;
}
}
}
return player;
}