Tow question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP (
https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Client Support (
https://sampforum.blast.hk/forumdisplay.php?fid=16)
+--- Thread: Tow question (
/showthread.php?tid=436615)
Tow question -
Tanush123 - 12.05.2013
How to tow a vehicle with a tower
? Noob question
Re: Tow question -
freddy smyth - 12.05.2013
It depends.
In single player, you lower the tow cable and approach the front of the target car, then raise the cable. After that, you lower it again to release the car. In SAMP, I think a command is used; Generally something like /tow.
Re: Tow question -
jotan. - 12.05.2013
pawn Код:
COMMAND:tow(playerid,params[])
{
#pragma unused params
if(StateDriver[playerid])
{
new vehicleid=GetPlayerVehicleID(playerid);
if(IsTrailerAttachedToVehicle(vehicleid))
DetachTrailerFromVehicle(vehicleid);
else
{
new trailerid=GetClosestVehicle(playerid,vehicleid);
if(trailerid!=vehicleid && IsPlayerInRangeOfVehicle(playerid,10.0,trailerid))
AttachTrailerToVehicle(trailerid,vehicleid);
}
}
else
SendClientMessage(playerid,0xAA3333AA,"You must be in vehicle to Tow.");
return 1;
}
Re: Tow question -
Tanush123 - 12.05.2013
Thanks
Re: Tow question -
freddy smyth - 12.05.2013
No worries. By the way, I think the same pretty much applies for trucks/trailers and baggage vehicles/baggage carts, though you just reverse into them. I think they are mostly attached via a script command in SAMP also.
AW: Tow question -
ulbi1990 - 12.05.2013
Nope freddy smyth Trailers can be normally attached like in SP, only the Tow Truck can't tow like in SP.
Re: Tow question -
RajatPawar - 12.05.2013
Something not important, but anyways, at jotan.
can also be used if there are no parameters.
Re: Tow question -
MP2 - 12.05.2013
Instead of a command, I'd personally use KEY_ACTION. It has no other use so why not (apart from NOS, but who puts NOS on a tow truck?)?
Re: Tow question -
Tanush123 - 12.05.2013
Quote:
Originally Posted by MP2
Instead of a command, I'd personally use KEY_ACTION. It has no other use so why not (apart from NOS, but who puts NOS on a tow truck?)?
|
Didn't sa-mp 0.3d had that key for towing? I think i remember that.
Re: Tow question -
MP2 - 13.05.2013
KEY_ACTION has always been there..