08.10.2010, 08:05
!strcmp(cmdtext,"/spawncar",true) might not return true if you type '/spawncar <anynumber>'
in other words, if you enter a parameter after the command, the command will not be recognised.
to test this type /spawncar, it should tell you 'USAGE: /spawncar [model]'
you can fix this by structuring your command properly.. ie
in other words, if you enter a parameter after the command, the command will not be recognised.
to test this type /spawncar, it should tell you 'USAGE: /spawncar [model]'
you can fix this by structuring your command properly.. ie
pawn Код:
public OnPlayerCommandText(playerid, cmdtext)
{
new cmd[32],tmp[32],idx;
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/spawncar",true))
{
tmp = strtok(cmdtext, idx);
// rest of command here