[AJUDA] 4 erros
#10

Quote:
Originally Posted by Dj_Paradox
Посмотреть сообщение
Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
new string[256];
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][PlayerAdmin] == 0)
            {
                SendClientMessage(playerid, COLOR_RED, "Vocк nгo й Administrador!");
                return 1;
            }
        GetPlayerName(playerid, Pname, sizeof(Pname));
            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_RED, "USE: /av [texto]");
                return 1;
            }
            SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo [TAG] ______________|");
            format(string, sizeof(string), "{FF0000}Administrador %s: %s", sendername, result);
        }
        return 1;
    }
Tenta isso , o erro й por que voзк nao definio a string...
Espero ter ajudado atй mais
pawn Код:
if(strcmp(cmd,"/avisar",true)==0)
    {
        if(PlayerInfo[playerid][PlayerAdmin] > 1)
        {
            new result[128];
            result = strtok(cmdtext, idx);
            if(!strlen(result))
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "USE: /avisar [texto]");
                return 1;
            }
            new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        new string[128];
                        SendClientMessageToAll(0xFFFFFFAA, "-- Aviso da Administraзгo [TAG] --");
                        format(string,sizeof(string),"Administrador: %s %s", sendername, (result));
                        SendClientMessageToAll(0xFFFFFFAA, string);
            }
        return 1;
    }
Nгo precisa ter o comando grandгo --'
Reply


Messages In This Thread
[AJUDA] 4 erros - by [AF]Junior - 21.02.2011, 20:52
Re: [AJUDA] 4 erros - by Dj_Paradox - 21.02.2011, 20:57
Re: [AJUDA] 4 erros - by Domozinho - 21.02.2011, 20:58
Re: [AJUDA] 4 erros - by [AF]Junior - 21.02.2011, 21:13
Re: [AJUDA] 4 erros - by deregudegu - 21.02.2011, 21:14
Re: [AJUDA] 4 erros - by [AF]Junior - 21.02.2011, 21:24
Re: [AJUDA] 4 erros - by Dj_Paradox - 21.02.2011, 21:38
Re: [AJUDA] 4 erros - by [AF]Junior - 21.02.2011, 21:53
Re: [AJUDA] 4 erros - by Dj_Paradox - 21.02.2011, 21:55
Re: [AJUDA] 4 erros - by Ricop522 - 25.02.2011, 14:48

Forum Jump:


Users browsing this thread: 2 Guest(s)