[Perfect for RP Servers] 1.0.0

   (6 reviews)

2 Screenshots

About This File

What is this amazing script?

You are also able to control the steering (unable to set straight afterwards due to setSteeringAngle not being implemented yet) so you can move the vehicle to the side of the road.

If you are an RP server then this is perfect for you!

With some wizard maths, the text and position is at the correct end of each car and is based on distance (This has taken over 6 hours to get right)

 

Configuration

I have already built in configuration to set whether you can allow it on locked vehicles, low health vehicles, whether the engine is off and certain vehicle classes.

These can all be configured in the config section of the file:

this.config = {
           AllowVehicleClass: [0, 1, 2, 3, 4, 5, 6, 9, 18], // These are the normal vehicles in the game classes - to disable it, set it to false
           MaxVehicleCubedSize: 25, // This is the vehicle length * width - as an idea an ambulance is 21
           LockHandbrakeProtection: false, // If set - you can't push a locked vehicle (Theft prevention or ditching cars)
           EngineProtection: false, // If set - you can only push if the enginer is turned off
           VehicleHealthProtection: false, // Must be less than 1000 or false which de-activates checking vehicle health
           PushEventName: false, // Set this to send an event to your server with the relevant Vehicle and Player attached (ie 'pushing_car')
           LabelsDisplayed: true, // Show labels near the pushing positions when close enough
           DebugPositions: false, // View pushing positions as markers so they are more visible
           AllowVehicleSteering: true, // Allows the player to turn the wheels of the vehicle using A and D keys
}

 

In Action

To see how it looks working just checkout:
https://streamable.com/ab2v5

 

Questions

Lastly if you have any questions feel free to give me a shout on discord (wdoyle2) or respond in the comment section.

This is currently not on github but more than happy to post it for any future pull requests. 

3ahz9c.jpg

 

  • Like 7
  • Mask 1



User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest

draobrehtom

· Edited by draobrehtom

   1 of 1 member found this review helpful 1 / 1 member

@Wdoyle

you are star bringing the light to this community - such a great work!

Just want to add very little change, when there is no any cars near:

const Vehicle = mp.vehicles.atHandle(idVehicle);
if (Vehicle === null) {
    return false;
}
const vehClass = Vehicle.getClass(); // there is error

Share this review


Link to review
Amekudeku

   1 of 1 member found this review helpful 1 / 1 member

well done😯

Share this review


Link to review
Jaimuzu

   1 of 1 member found this review helpful 1 / 1 member

this is great  

got my car 🚗 pushed 🧗‍♂️

🧗‍♀️🧗‍♀️🧗‍♀️🚗🚗🚗

  • Like 2

Share this review


Link to review
PanaFive

  

i love this

Share this review


Link to review
Lunoro

  

Love it!

Share this review


Link to review
ynhhoJ

  

Nice job!

Share this review


Link to review