Spawn Vehicle Command not working
#6

!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
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
Reply


Messages In This Thread
Spawn Vehicle Command not working - by jameskmonger - 07.10.2010, 20:20
Re: Spawn Vehicle Command not working - by Tommie1331 - 07.10.2010, 23:25
Re: Spawn Vehicle Command not working - by Grim_ - 07.10.2010, 23:27
Re: Spawn Vehicle Command not working - by Lenny the Cup - 07.10.2010, 23:28
Re: Spawn Vehicle Command not working - by jameskmonger - 08.10.2010, 07:53
Re: Spawn Vehicle Command not working - by Rachael - 08.10.2010, 08:05
Re: Spawn Vehicle Command not working - by jameskmonger - 08.10.2010, 08:45

Forum Jump:


Users browsing this thread: 1 Guest(s)