20.01.2013, 05:56
Only one admin will appear on the list of admins even if there's more than one online.
Help appreciated!
Help appreciated!
PHP код:
case 2:
{
new name[MAX_PLAYER_NAME],string[128],id,admin[20],duty[32];
GetPlayerName(id,name,sizeof(name));
if(PlayerInfo[playerid][pAdmin]==1) {admin ="Moderator";}
else if(PlayerInfo[playerid][pAdmin]==2) {admin="Administrator";}
else if(PlayerInfo[playerid][pAdmin]==3) {admin = "Head Administrator";}
if(PlayerInfo[playerid][pDuty]==0) {duty ="{FF0000}Off duty";}
else if(PlayerInfo[playerid][pDuty]==1) {duty ="{007F0E}On duty!";}
if(PlayerInfo[id][pAdmin]>0)
{
format(string,sizeof(string),"{FF7FB6}%s {A9C4E4}%s is %s",admin,name,duty);
ShowPlayerDialog(playerid,6,DIALOG_STYLE_MSGBOX,"Staff team", string, "Close", "");
}
}