Vehicle Spawner problem
#1

Hey Guys, Beginning Scripter here, I've been fooling around with the base game mode Rivershell and
just been adding stuff onto it.

I'm having trouble with my car spawning command.

-When I spawn a Vehicle, it spawns on top of me.

I want to make it so that when I Spawn a Vehicle, I spawn inside of it as the Driver.

here is my snippet of code
i would really appreciate if someone could help me with this, also i use ZCMD.

Код:
CMD:v(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >= 2)
	{

		new
			iVehicle,
			iColors[2];

		if(sscanf(params, "iii", iVehicle, iColors[0], iColors[1]))
		{
			SendClientMessage(playerid, COLOR_PURPLE, "USAGE: /v [Car ID] [Colour 1] [Colour 2]");
		}
		else if(!(400 <= iVehicle <= 611))
		{
			SendClientMessage(playerid, COLOR_PURPLE, "No Such Vehicle Model (400 - 611)");
		}
		else if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255))
		{
			SendClientMessage(playerid, COLOR_PURPLE, "No Such Colour (0 - 255)");
		}

		new
            Float: fVehPos[4];
            
		GetPlayerPos(playerid, fVehPos[0], fVehPos[1], fVehPos[2]);
		GetPlayerFacingAngle(playerid, fVehPos[3]);
		CreateVehicle(iVehicle, fVehPos[0], fVehPos[1], fVehPos[2]+0.2, fVehPos[3], iColors[0], iColors[1], -1);
		return SendClientMessage(playerid, COLOR_PURPLE, "Your Vehicle Has Spawned!");
	}
	return 1;
}
Reply
#2

Use PutPlayerInVehicle
Reply
#3

I did, I used it right after CreateVehicle and it still spawns the car on top of me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)