[RESOLVIDO] /comando ID por Drakon
#3

Hum Faz Assim
TUTORIAL:
Final do GM
pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
 
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Em OnPlayerCommandText:

pawn Код:
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
pawn Код:
if(strcmp(cmd, "/elegay", true) == 0)//COAMNDO
    {
        new tmp[128];//DECLARA TEMP
        tmp = strtok(cmdtext, idx);//INDICA TMP
 
        if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Seu Noob Aprende: /elegay ID:]");
 
        SendClientMessage(COLOR,strval(tmp));//TMP = ID
        return 1;
    }
Pedro so Deu CTRL + C do GM rs,
Reply


Messages In This Thread
[RESOLVIDO] /comando ID por Drakon - by BurrodaZero - 29.04.2010, 23:05
Re: [AJUDA] /comando ID - by pedro - 29.04.2010, 23:11
Re: [AJUDA] /comando ID - by ipsBruno - 29.04.2010, 23:19
Re: [AJUDA] /comando ID - by pedro - 29.04.2010, 23:25
Re: [AJUDA] /comando ID - by BurrodaZero - 30.04.2010, 02:44
Re: [RESOLVIDO] /comando ID por Drakon - by andmeida10 - 30.04.2010, 12:09

Forum Jump:


Users browsing this thread: 2 Guest(s)