PDA

View Full Version : command /towtruckliftacar


Join7
08/10/2011, 03:21 PM
How to make the command /towtruckliftacar

When I write a command /towtruckliftcar
to the Tow Truck, attached to my car which was behind me
limited to 10 meters

nilanjay
08/10/2011, 04:02 PM
Usually people makes control system to attach a car behind the tow truck. No one uses cmds for that.

AndreT
08/10/2011, 04:08 PM
1. Find a vehicle close to the player (using GetClosestVehicle (http://pastebin.com/4p3c0wba)) with a radius of 10.
2. Do some trigonometry if you find it necessary to see if the vehicle is behind the player or heading the same way (approximately).
3. Use AttachTrailerToVehicle (http://wiki.sa-mp.com/wiki/AttachTrailerToVehicle) to attach the vehicle as a trailer to your player's vehicle.

Join7
08/10/2011, 07:40 PM
Can I do that I did not receive

Join7
09/10/2011, 10:20 AM
up of topic...

EDIT: I tried http://pastebin.com/yN4xtaBt. And not working

wups
09/10/2011, 10:34 AM
up of topic...

EDIT: I tried http://pastebin.com/yN4xtaBt. And not working

What seems to be the problem?

AndreT
09/10/2011, 10:34 AM
The first thing I'd do in that script is replace the old methods with newer ones. The link (http://pastebin.com/4p3c0wba) I gave you uses a native function for calculating distances and is hence faster.

Try something like this: http://pastebin.com/6TgiWFK7

Join7
09/10/2011, 10:47 AM
error 017: undefined symbol "GetVehicleDistanceFromPoint"

AndreT
09/10/2011, 10:58 AM
I'm very very sure it is a native function (http://wiki.sa-mp.com/wiki/GetVehicleDistanceFromPoint). What server version are you using?

Join7
09/10/2011, 11:01 AM
I put R5 Includes fine

But when I want to lift a car does not work