19.11.2011, 23:54
(
Last edited by Dolby; 20/11/2011 at 01:44 PM.
)
Player mais Rico do Servidor:
pawn Code:
new Recorde;
new ID;
new Texto[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnect(i)) continue;
if(GetPlayerMoney(i) > Recorde) Recorde = GetPlayerMoney(i),ID = i;
}
format(Texto,120,"O Player Mais Rico do Servidor й o %s com $%d",GetPlayerNameEx(ID),Recorde);
SendClientMessageToAll(0x008000AA,Texto);
stock GetPlayerNameEx(playerid)
{
new Nome[24];
GetPlayerName(playerid,Nome,MAX_PLAYER_NAME];
return Nome;
}