Mechanic car wont hook cars - 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)
+--- Thread: Mechanic car wont hook cars (
/showthread.php?tid=309690)
Mechanic car wont hook cars -
vent - 08.01.2012
Why wont the mechanic car hook the cars?
Re: Mechanic car wont hook cars -
Rob_Maate - 08.01.2012
You need to tell it to via script.
See:
https://sampwiki.blast.hk/wiki/AttachTrailerToVehicle
Re: Mechanic car wont hook cars -
vent - 08.01.2012
Well, if you push alt, the car behind you will hook up my mechanic car. Thats what i meant.
Re: Mechanic car wont hook cars -
Rob_Maate - 08.01.2012
See here:
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE) //Or whatever key, look up the full list @ wiki
{
AttachTrailerToVehicle(/*trailerid*/, GetPlayerVehicleID(playerid));
}
}
You'll need a snippet to find the closest vehicle, but I'm mad tired n im going to sleep