help in /announce || /ann
#1

please help me guyz in this cmd,
when i use it as : /ann [NoText] and /announce [NoText] it sayd the usage
but when i use it /announce [Text] it says SERVER:Unknown Command
why , here the /announce or /ann cmd
check it and fix it plz
CLICK ME =)
Reply
#2

pawn Код:
if (!strcmp("/ann", cmdtext, true) || !strcmp("/announce", cmdtext, true))
{
    if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xff0000ff, "Need To Be A RCON Admin !");
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
        idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
        result[idx - offset] = cmdtext[idx];
        idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
        SendClientMessage(playerid, -1, "USAGE: /ann [text]");
        return 1;
    }
    GameTextForAll(result, 5000, 0);
    return 1;
}
Edit: not tested.
Reply
#3

maybe you forgot to set your level XD
Reply
#4

i didn't xD and btw its not working
Reply
#5

I need to know your using strcmp strtok zcmd y_ini sscanf2 or what?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)