Command keeps returning "Unknown Command"
#1

Probably some stupid mistake, I'm just not seeing it. When a user tries /ticket, it says "USAGE: /ticket [question]" which is should. However, if they use "/ticket Hello World" it gives them
Код:
** Ticket has been sent to on duty admins
SERVER: Unknown Command
and if there is no admins on duty, it just returns
Код:
SERVER: Unknown Command
pawn Код:
//Message to Send if user submits ticket, but no admins are on duty
new NoDutyMessage[128] = "No admins are currently on duty or may be busy. Try again later";
//Color of no-duty Message
#define NoDutyColor 0xFF0000FF
pawn Код:
CMD:ticket(playerid, params[]){

    new text[128];

    if(!sscanf(params, "s[128]", text)){
        if(AdminCheck(playerid)) return SendClientMessage(playerid, 0xFA8072FF, "Admins cannot submit tickets"); //delete if if you want admins to be able to submit tickets
        if(SubmittedTicket[playerid] != -1) return SendClientMessage(playerid, 0xFA8072FF, "You alreaddy have a ticket sent out");
        if(!AdminsOnDuty()) return SendClientMessage(playerid, NoDutyColor, NoDutyMessage);

        SubmittedTicket[playerid] = playerid;
        SendClientMessage(playerid, 0xFA8072FF, "** Ticket has been sent to on duty admins");

        //format message to admins
        new aMessage[128];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(aMessage, sizeof(aMessage), "** Incoming ticket from %s, Use /claim %i to claim", pName, playerid);
        SendClientMessageToOnDutyAdmins(aMessage);

        TicketInfo[playerid][claimed] = 0;
        TicketInfo[playerid][query] = text;
        TicketInfo[playerid][player] = playerid;
        TicketInfo[playerid][helper] = -1;
    } else {
        return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /ticket [question]");
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)