COMMAND:admins(playerid, params[]) { new s[128]; new ss[128]; for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][pAdmin] > 0) { GetPlayerName(i, Jogador, sizeof(Jogador)); format(s, 128, "{FFFFFF}%s {FF00FF}[%s]", Jogador, admins(i)); strcat(s, ss, sizeof(s)); } } ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", s, "fechar", ""); return true; }
admins(playerid) { new String[64]; if(PlayerInfo[id][pAdmin] == 1) String = "Moderador"; else if(PlayerInfo[playerid][pAdmin] == 2) String = "NНVEL 2"; else if(PlayerInfo[playerid][pAdmin] == 3) String = "NНVEL 3"; else if(PlayerInfo[playerid][pAdmin] == 4) String = "NНVEL 4"; else if(PlayerInfo[playerid][pAdmin] == 5) String = "NНVEL 5"; return String; }
COMMAND:admins(playerid, params[])
{
new sprimaria[128];
new ssecundaria[400];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] > 0)
{
GetPlayerName(i, Jogador, sizeof(Jogador));
format(sprimaria, 128, "{FFFFFF}%s {FF00FF}[%s]", Jogador, admins(i));//24 + 10 +- 34 por admin supondo 10 adimns on 340
}
}
ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", ssecundaria, "fechar", "");
return true;
}
if(PlayerInfo[i][pAdmin] >= 1)
COMMAND:admins(playerid, params[])
{
new s[128], ss[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] > 0)
{
GetPlayerName(i, Jogador, sizeof(Jogador));
format(ss, 128, "{FFFFFF}%s {FF00FF}[%s]", Jogador, admins(i));
strcat(s, ss);
}
}
ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", s, "fechar", "");
return true;
}
strcat o primeiro parametro й o destino!
pawn Код:
|