17.12.2017, 14:56
use an array and put it on top of script
then in script
PHP код:
new const gAdminRanks[MAX_ADMINRANKS][] =
{
{"Player"}, // if level = 0
{"Junior Admin"}, // if level = 1
{"Basic Admin"}, // if level = 2
{"Advanced Admin"}, // if level = 3
{"Senior Admin"}, // if level = 4
{"Head Admin"}, // if level = 5
{"Executive Admin"} // if level = 6
};
PHP код:
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}Administrators Online");
foreach(new i : Player)
{
if(pInfo[i][pAdmin])
{
format(string, sizeof(string), "%s %s{%d}", gAdminRanks[ pInfo[i][pAdmin] ], NameL(i),playerid);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
