SA-MP Forums Archive
/pullincar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /pullincar (/showthread.php?tid=14220)



/pullincar - Battleskull - 09.10.2007

Please help i have no clue where to begin a command that will pull people into your car.


Re: /pullincar - Pixels^ - 09.10.2007

Just use PutPlayerInVehicle and dcmd.


Re: /pullincar - Towlies - 09.10.2007

Well its not hard at all it is just a simple function to connect the Trailer or another car.

pawn Код:
AttachTrailerToVehicle(trailerid, vehicleid);
You can build up a simple function to get the cars in a total radius. Also you can't attach a vehicle that has a driver in it. There CAN be a passenger because they have no control of the vehicle to unhook it.


Re: /pullincar - X_Cutter - 09.10.2007

Towlies, I think he means to put someone in your car using a command.


Re: /pullincar - Towlies - 09.10.2007

Quote:
Originally Posted by [LSB
X_Cutter ]
Towlies, I think he means to put someone in your car using a command.
Not sure, I thought he meant like actually pull the car like a trailer.

Lets wait for his comment to be for sure. Can you give us more information?


Re: /pullincar - Battleskull - 09.10.2007

I do not know how dcmd works and I am very new to SAMP script


Re: /pullincar - Bromly - 09.10.2007

Код:
	if(strcmp(cmd, "/pullincar", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id]");
				return 1;
			}
			new person;
			person = strval(tmp);
			new playerVehicle = GetPlayerVehicleID(playerid);
			PutPlayerInVehicle(person, playerVehicle, 3);
		}
		return 1;
	}
Something I just brewed up, not sure if it works but it could be a start.


Re: /pullincar - Battleskull - 09.10.2007

thank you i will try it


Re: /pullincar - X_Cutter - 09.10.2007

Quote:
Originally Posted by Battleskull
thank you i will try it
You mean to attach a car to another or put a player in your car?




Re: /pullincar - Bromly - 09.10.2007

What he means, is pull in a player to the police car e.g. forcing them in, towing a car isn't RP like unless its with a tow truck in which case there is a filterscript out there that enables it to work.