[Standalone]Anti Vehicle Powergame

What does the script do ?

This script prevents powergaming: Example: if you have a Massacro, you won’t be able to drive fast on dirt road exept if you put off-road wheels, but in this case, you will be slower on normal roads. Instead of setting up rules based on fairplay, the script does the job :slight_smile:

Basically, if your vehicle is not equipped with off-road wheels, it will lose some grip and traction if you drive off the road above a certain speed.

If you put off-road wheels on Compact, Sedan, Coupe, Muscle, Sport Classic, Sport or Super cars, the vehicle’s max speed is reduced, even on roads.

Video preview : Anti Vehicle Powergame preview

Features

  • If your vehicle isn’t equipped with off-road wheels and you drive above a certain speed off road, the grip and traction are reduced.
    The “speed limit” is a random number between 65 and 90 km/h reset every 3 seconds, so if you are lucky, it’s 90, on the contrary, it will be 65.

    The amount of grip and traction depends on the vehicle’s class:

    • Very big loss of traction : Super cars
    • Big loss of traction : Sports
    • Small loss of traction : SUV
    • Standard loss of traction : All of the other classes
  • If your car is a Compact, Sedan, Coupe, Muscle, Sport Classic, Sport, Super or a vehicle in the ListVehicleLimited (L.8 of client.lua), its speed is reduced if it has off-road wheels equipped(Configurable on L.5 of client.lua).
    Usefulness of the list: if the car belongs to the emergency vehicles class, it’s impossible to differentiate if it’s an Offroad or a Sport and we want sport to be limited (sport car is not intended to be equipped with off-road wheels), so we have to differentiate manually.
    /!\ If you have modded emergency cars, don’t forget to put label names of the Compact, Sedan, Coupe, Muscle, Sport Classic, Sport and Super cars in the list.

  • If you equip a super car with off-road wheels, the car won’t drive (we need realism). (Configurable on L.4 of client.lua)

  • If you put off-road wheels on any vehicle, the suspension level is reset to its higher level and can’t be lowered while the wheels are one (Configurable on L.3 of client.lua)

  • Debug text : tells you if you are considered on the road / off the road and the “max speed” to drive normally without off-road wheels on off road.
    /!\ loss of optimization if set true (Configurable on L.2 of client.lua)

  • The script is annoted if you want to understand better how it works

Patchnotes

  • New lists of exceptions : Off-road vehicle who must be limited (some are to win RP) → The speed reduction is lower when the class is Off-Road
    Vehicle Not limited (some vehicles are Off-Road but not in the right category so it should not be limited when equipped with off-road wheels. Example : Seminole Frontier / Rat Loader
  • Speed reductions are modified
  • Sport classics cars now lose grip as same as a sport car (before, it lost grip as a standard vehicle)

Performance

0.00 ms normally
0.04 ms when Debug Text is On (not useful on a daily usage)

Code is accessible : Yes
Subscribtion-based : No
Lines (approximatly) : 190
Requirements : None
Support : No

You can get this script here : https://lennys-scripts.tebex.io/

3 Likes

Please fill out the whole template

2 Likes

yep sorry, it’s done

what is the difference between the free script?

If you talk about xenos_antipowergame and AntiPG,
xenos modified gravity of the vehicle to reduce traction and
AntiPG uses classes of vehicle and the traction is weirdly reduced
You can try them of course but they don’t have as many feature as mine.
For both, as soon as you are on the dirt and no matter the speed, you will lose grip (not really realistic), your vehicle won’t be limited for having off-road wheels (in the case of xenos, the other one isn’t based on that system) and the loss of grip isn’t calibrated for each class, etc.
In short, I worked on this in order to be the more realistic and RP because I tried the free scripts but I wasn’t satisfied, like we say, If you want something done right, you have to do it yourself ! Now, I did it myself and I’m giving it to the community

can you update for bike ?

I’d like to do it with bikes but unfortunately, we can’t differentiate wheels on bike because there are not Sport / SUV / Off-road / etc wheels, it’s just Bike wheels … I could do it but only with model names and one by one; So for example a sport bike will lose grip but a bf400 won’t

GetVehicleModVariation?

@Lenny9996

If your question is to know if the script takes custom wheels into account, the answer is not yet.

Does this essentially perform a linetrace of sorts detecting what material the vehicle is driving on to know if its on dirt or not?

It detects which material is in contact with the wheels, some materials are defined to be considered as slippery without off-road wheels.

I am going to give it a try. I would love to stop the jank drivers going off road and driving as if its normal. I dont much care about the off road tires or not feature. But the general aspect of them going off into the desert or bushes pisses me off when they drive like as if they were on pavement

Simply great script. Every penny was worth it and I would buy it again and again.
The support is fast and super friendly and the most important it helps you.

1 Like

I’m going to pick this resource up, but this would be nice - it would be an excellent config option to mark specific cars/motorcycles. Want to prevent sports bikes from handling like they are on paved road.