24.04.2011, 23:19
Hello how to make this like
COMMAND:....
bla bla
I hope you understand in to zcmd
COMMAND:....
bla bla
I hope you understand in to zcmd
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256],idx;
cmd = strtok(cmdtext,idx);
if(strcmp(cmd,"/drift",true) == 0)
{
new tmp[30];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp) || strval(tmp) < 1 || strval(tmp) > 53) return SendClientMessage(playerid, COLOR_YELLOW, "ERROR: Invalid Drift place. It can be only from 1 to 53!");
PlayerGoesDrift(playerid, DriftCoords[strval(tmp)-1][0], DriftCoords[strval(tmp)-1][1], DriftCoords[strval(tmp)-1][2], DriftCoords[strval(tmp)-1][3], DriftCoords[strval(tmp)-1][4]);
return 1;
}
return 0;
}