#2

Try this:
pawn Код:
if(strcmp(cmd, "/ann", true) == 0)
    {
        if (IsPlayerAdmin(playerid))
        {
            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, COLOR_GRAD1, "Enter a message, Mr. Retard-o");
                return 1;
            }
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    GameTextForPlayer(i, result, 5000, 6);
                }
            }
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "Log into RCON to use this");
            return 1;
        }
    }
Reply


Messages In This Thread
/ann - by Agent Smith - 14.03.2009, 20:46
Re: /ann - by Zoopaman - 14.03.2009, 21:10
Re: /ann - by Agent Smith - 14.03.2009, 21:20
Re: /ann - by Zoopaman - 14.03.2009, 21:46
Re: /ann - by Agent Smith - 14.03.2009, 21:52
Re: /ann - by StrickenKid - 14.03.2009, 21:53
Re: /ann - by Agent Smith - 14.03.2009, 21:54
Re: /ann - by StrickenKid - 14.03.2009, 21:55
Re: /ann - by Zoopaman - 14.03.2009, 22:20
Re: /ann - by Agent Smith - 14.03.2009, 22:22

Forum Jump:


Users browsing this thread: 1 Guest(s)