/pullincar
#1

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

Just use PutPlayerInVehicle and dcmd.
Reply
#3

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.
Reply
#4

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

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?
Reply
#6

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

Код:
	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.
Reply
#8

thank you i will try it
Reply
#9

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?

Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)