29.04.2010, 23:19
Hum Faz Assim
TUTORIAL:
Final do GM
Em OnPlayerCommandText:
Pedro so Deu CTRL + C do GM rs,
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;
}
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;
}