[Ajuda]
#2

Seu erro pode ter cido na linha do comando, colocou cmdtext pra um comando um pouco mais complexo onde o recomendбvel й usar cmd.
pawn Код:
if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
    {
        if(TemRadio[playerid] == 1 && PlayerInfo[playerid][pClass] > 1)
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            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)) return SendClientMessage(playerid, COLOR_GRAD, "USE: (/R)adio [texto]");
            format(string, sizeof(string), "Admin %s: %s", sendername, result);
            SendRadioMessage(0xFF6400FF,string);
        }
        return 1;
    }
Reply


Messages In This Thread
[Ajuda] - by Carl_Thuse - 09.05.2011, 15:13
Re: [Ajuda] - by Josma_cmd - 09.05.2011, 15:23
Re: [Ajuda] - by Carl_Thuse - 09.05.2011, 15:27
Re: [Ajuda] - by Josma_cmd - 09.05.2011, 15:29
Re: [Ajuda] - by Carl_Thuse - 09.05.2011, 15:34
Re: [Ajuda] - by Josma_cmd - 09.05.2011, 15:37
Re: [Ajuda] - by Carl_Thuse - 09.05.2011, 15:43
Re: [Ajuda] - by Macintosh - 09.05.2011, 16:21
Re: [Ajuda] - by Carl_Thuse - 09.05.2011, 16:23
Re: [Ajuda] - by Macintosh - 09.05.2011, 16:29

Forum Jump:


Users browsing this thread: 3 Guest(s)