13.06.2015, 15:52
You must use a local string:
PHP код:
if(strcmp(cmd, "/admins", true) == 0)
{
new t_string[512]; //a local string is important!
for(new i,l=GetPlayerPoolSize()+1,alevel[50]; i < l; i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pStealthed] == 0)
{
switch(PlayerInfo[i][pAdmin]) {
case 1: alevel = "{951FD0}Probie Admin";
case 2: alevel = "{00FF0C}Junior Admin";
case 3: alevel = "{00FF0C}General Admin";
}
if(PlayerInfo[i][pAdmin] >= 4 && PlayerInfo[i][pAdmin] <= 1335) { alevel = "{F4A460}Senior Admin"; }
else if(PlayerInfo[i][pAdmin] >= 1336 && PlayerInfo[i][pAdmin] <= 99998) { alevel = "{FF0000}Head Admin"; }
else if(PlayerInfo[i][pAdmin] >= 99999) { alevel = "{B52B19}Executive Admin"; }
format(t_string, sizeof t_string, "%s{FFFFFF}[ %s {FFFFFF}] %s\n",t_string, alevel, PlayerRPName(i));
}
}
ShowPlayerDialog(playerid,1378,DIALOG_STYLE_LIST,"{FFFFFF}Admins Online",t_string,"Ok","");
return 1;
}