[Ajuda]
#8

O erro estava aqui no result, deveria ser tmp ou algo do tipo. define no topo do OnPlayerCommandText new tmp[256];


pawn Код:
if (strcmp("/radio", cmdtext, true, 10) == 0 || strcmp("/r", cmdtext, true, 10) == 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(tmp)) // O erro estava aqui no result, deveria ser tmp ou algo do tipo. define no topo do OnPlayerCommandText new tmp[256];
            {
                SendClientMessage(playerid, COLOR_GRAD, "USE: (/R)adio [texto]");
                return 1;
            }
            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)