How do I keep a player inside a vehicle when setplayerpos
#5

Quote:
Originally Posted by ExtendedCarbon
Посмотреть сообщение
I've got
Код:
	COMMAND:lv(playerid, params[])
	{
	    SetVehiclePos(vehicleid, 2005.7919,1544.5870,13.5042)
	    SetPlayerVirtualWorld(playerid, 0);
		SetPlayerPos(playerid, 2005.7919,1544.5870,13.5042);
		PutPlayerInVehicle(playerid, vehicleid, 0);
	    SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to: Las Venturas");
	    return 1;
	}
But I'm getting an error:
error 017: undefined symbol "vehicleid"
error 017: undefined symbol "vehicleid"

How do I make it so I can use vehicleid inside of the command?
Use the following code:

Код:
	COMMAND:lv(playerid, params[])
	{
            new vehicleid = GetPlayerVehicleID(playerid);
            if(!IsPlayerInAnyVehicle(playerid))
            {
            	SetPlayerPos(playerid, 2005.7919,1544.5870,13.5042);
	    }
            else
            {
	    	SetVehiclePos(vehicleid, 2005.7919,1544.5870,13.5042)
	    }
	    SetPlayerVirtualWorld(playerid, 0);
	    SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to: Las Venturas");
	    return 1;
	}
+REP if I helped
Reply


Messages In This Thread
How do I keep a player inside a vehicle when setplayerpos - by ExtendedCarbon - 08.09.2013, 16:38
Re: How do I keep a player inside a vehicle when setplayerpos - by [HK]Ryder[AN] - 08.09.2013, 16:46
Re: How do I keep a player inside a vehicle when setplayerpos - by ExtendedCarbon - 08.09.2013, 16:55
Re: How do I keep a player inside a vehicle when setplayerpos - by Fierro - 08.09.2013, 16:58
Re: How do I keep a player inside a vehicle when setplayerpos - by Ceez - 08.09.2013, 17:02

Forum Jump:


Users browsing this thread: 2 Guest(s)