30.03.2019, 01:36
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/recorde", true) == 0)
{
MaiorNivel()
return 1;
}
return 1;
}
MaiorNivel()
{
new
PlayerID = -1,
MaiorLevel,
string[128]
;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))
continue
;
if(GetPlayerScore(i) > MaiorLevel)
{
PlayerID = i;
MaiorLevel = GetPlayerScore(i);
}
}
if(PlayerID == -1)
return
;
new Name[MAX_PLAYER_NAME];
GetPlayerName(PlayerID, Name, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s (ID: %d) [Level: %d] й o player com o maior nнvel conectado no servidor!", Name, PlayerID, GetPlayerScore(i));
SendClientMessageToAll(-1, string);
}