Two big problems (extra parameters & adminchat)
#5

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
pawn Код:
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /a(admin) [text]");
Try that then.

EDIT: Check my first post again.
No errors but I have the same bug.
'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;
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)