Spawn Vehicle Command not working
#1

Код:
	if (!strcmp (cmdtext,"/spawncar", true))
    {
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "USAGE: /spawncar [modelid]");
			return 1;
		}
        new thecar = strval(tmp);
        if(IsPlayerAdmin(playerid)) //Is the player rcon admin?
        {
         	if(thecar > 399 && thecar < 612)
 			{
            if(!IsPlayerInAnyVehicle(playerid)) //the "!" means that if "IsPlayerInVehicle" returns false, the code will execute, if not, the return code will.
            {
                GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
                GetPlayerFacingAngle(playerid, Float:Angle);
                CreateVehicle(thecar, X, Y, Z + 2.0, Angle + 90.0, -1, -1, 5000);
				return 1;
            }
            return SendClientMessage(playerid,0xFF0000FF,"You are already in a vehicle!"); //If the player already is in a vehicle, this will happen
			}
			return SendClientMessage(playerid, COLOR_WHITE, "Invalid ID");
        }
        return SendClientMessage(playerid,0xFF0000FF,"Access denied!"); //If the player wasn't logged in to rcon, this happens.
    }
I log into the RCON, do /spawncar 462 and it says Unknown Command.
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: 3 Guest(s)