16.09.2015, 15:37
PHP Code:
public OnGameModeInit()
{
SetTimer("Rank", 40000, true);
return 1;
}
forward Rank(playerid);
public Rank(playerid)
{
Uol++;
new Ue[128];
new Ie[11];
new IeID[11];
new Vixi[MAX_PLAYERS];
if (Uol == 1)
{
for(new i; i < GetMaxPlayers(); i++){if(IsPlayerConnected(i)) Vixi[i] = APlayerData[i][StatsTruckerJobs];}
for(new i; i < 11; i++){Ie[i] = -1;IeID[i] = -1;}
for(new i; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(Vixi[i] > Ie[1])
{
Ie[1] = Vixi[i];
IeID[1] = i;
}
}
for(new d; d < 2; d++)
{
if(IeID[d] != -1)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(IeID[d], Name, sizeof(Name));
format(Ue, sizeof(Ue), "%s (%i) й o melhor caminhoneiro no momento com %i missхes completas!!", Name, IeID[d], Ie[d]);
}
}
}
SendClientMessageToAll(-1, Ue);
return 1;
}
Uol = 0;
return 1;
}