Two big problems (extra parameters & adminchat)
#8

pawn Код:
CMD:admin(playerid,params[])
{
    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], Name[24];
    GetPlayerName(playerid,Name,24);
    format(seniormsg,sizeof(seniormsg),"Senior Administrator %s: %s",name,msg);
    format(juniormsg,sizeof(juniormsg),"Junior Administrator %s: %s",name,msg);
    format(leadmsg,sizeof(leadmsg),"Lead Administrator %s: %s",name,msg);
    if (PlayerInfo[playerid][pAdminLevel] == 1) SendAdminMessage(COLOR_LIGHTGREEN, juniormsg);
    else if (PlayerInfo[playerid][pAdminLevel] == 2) SendAdminMessage(COLOR_LIGHTGREEN, seniormsg);
    else 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)