20.12.2010, 22:20
Quote:
pawn Код:
EDIT: Check my first post again. |
'Lead Administrator Admantis:' but no text after /admin
pawn Код:
if (strcmp("/a",cmd, true) == 0 || strcmp("/admin",cmd,true)==0)
{
tmp = strtok(cmdtext,idx); new msg = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /a(admin) [text]");
new seniormsg[128], juniormsg[128], leadmsg[128];
GetPlayerName(playerid,seniormsg,sizeof(seniormsg));
GetPlayerName(playerid,juniormsg,sizeof(juniormsg));
GetPlayerName(playerid,leadmsg,sizeof(leadmsg));
format(seniormsg,sizeof(seniormsg),"Senior Administrator %s: %s",seniormsg,msg);
format(juniormsg,sizeof(juniormsg),"Junior Administrator %s: %s",juniormsg,msg);
format(leadmsg,sizeof(leadmsg),"Lead Administrator %s: %s",leadmsg,msg);
if (PlayerInfo[playerid][pAdminLevel] == 1) SendAdminMessage(COLOR_LIGHTGREEN, juniormsg);
if (PlayerInfo[playerid][pAdminLevel] == 2) SendAdminMessage(COLOR_LIGHTGREEN, seniormsg);
if (PlayerInfo[playerid][pAdminLevel] == 3) SendAdminMessage(COLOR_LIGHTGREEN, leadmsg);
return 1;
}