24.01.2010, 22:05
Change:
To:
or:
And Change:
To:
Then, put 'strtok' in your Script:
pawn Код:
text = strtok(cmdtext, idx);
pawn Код:
new cmd[256], idx;
cmd = strtok(cmdtext, idx);
pawn Код:
new text[256];
pawn Код:
//------Dm arena-----/
if(strcmp(cmdtext, "/pocetak", true)== 0)
{
SetPlayerPos(playerid, 1318.4937,1266.2261,10.8203);
SendClientMessage(playerid,0xFFFF00AA,"Dobrodosli na SPAWN mijesto )
SetPlayerInterior(playerid, 0);
return 1;
}
pawn Код:
//------Dm arena-----/
if(strcmp(cmdtext, "/pocetak", true)== 0)
{
SetPlayerPos(playerid, 1318.4937,1266.2261,10.8203);
SendClientMessage(playerid,0xFFFF00AA,"Dobrodosli na SPAWN mijesto");
SetPlayerInterior(playerid, 0);
return 1;
}
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;
}