help in /announce || /ann
#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


Messages In This Thread
help in /announce || /ann - by MBX97 - 18.02.2011, 13:40
Re: help in /announce || /ann - by HyperZ - 18.02.2011, 14:14
Re: help in /announce || /ann - by jejemonerz123 - 18.02.2011, 15:30
Re: help in /announce || /ann - by MBX97 - 18.02.2011, 23:15
Re: help in /announce || /ann - by admantis - 19.02.2011, 00:16

Forum Jump:


Users browsing this thread: 2 Guest(s)