Jump to content
Repentz

[Tutorial] Realistic Vehicle Towing

Recommended Posts

Realistic Vehicle Towing

Credits: Stay Alive Tactical Team

 

Hey there, this script allows you to tow vehicles realistically using ropes, yes, it does check if the vehicle is locked.

Video of it in use:

 

1. In initServer.sqf, place this near the bottom, if you don't have an initServer, create one in your main directory.

diag_log "Attempting to initialize Towing Script...";
[] execVM "core\initTowing.sqf";

2. Create a new file inside core or wherever you're calling it named initTowing.sqf

3. Place the following code inside:

Click me, script was too long to post in this forums, just copy it from here.

Pastebin Backup

(optional)

For towing only for a specific side or sides, place the call to initTowing in either initMedic, initCop, etc instead of initServer.

4. Done! Let me know if it works for you!

 

 

  • Like 3

Share this post


Link to post
Share on other sites
48 minutes ago, Taco Duck said:

@Repentz How can i make it so only medics can tow i want to setup like a mechanic roleplay?

At the top of the file you could add

if (playerSide isEqualTo independent) then {

Remember to format it and add a }; at the bottom of the file to close off the if statement.

Share this post


Link to post
Share on other sites
34 minutes ago, Repentz said:

At the top of the file you could add

if (playerSide isEqualTo independent) then {

Remember to format it and add a }; at the bottom of the file to close off the if statement.

It wont work since this would be executed on server and not on client. 

Put line 41 : 

if(!(playerSide isEqualTo independent)) exitWith {};

or 

if(playerSide != independent) exitWith {};

Edited by Mash6

Share this post


Link to post
Share on other sites
3 minutes ago, Hyper4u.'<3 said:

This should work right?

if (playerSide isEqualTo civilian && license_civ_towing) then {

Yeah should work, just close the bracket at the end of the file

Share this post


Link to post
Share on other sites
10 minutes ago, Repentz said:

@TulparHAN Eğer kurulum eylemlerine koymanız gerekmez, eğer çalışıyorsa otomatik olarak araçlarda görünecektir.

 

Script not working :)

I just added it to initserver.sqf.

 

diag_log "Attempting to initialize Towing Script...";
[] execVM "tulparhan\script\initTowing.sqf";

 

 

Share this post


Link to post
Share on other sites
Just now, Hyper4u.'<3 said:

like this?

if (playerSide isEqualTo civilian && license_civ_towing) then {};

You could add an if statement to the initServer or the actual file just include the script or call to it within the {};

Share this post


Link to post
Share on other sites
6 minutes ago, Hyper4u.'<3 said:

Doesnt work for me either and i tried with and without

 

Fixed script please re-copy the new hastebin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×