Version 1.1.2 --Created by StaceyBee–
Here is a basic script to force player vehicles to stop once the tyres have been popped.
With many settings to choose from like the amount of tyres needed to pop before it stops, how you want to stop the vehicle, etc.
–[[ INSTALL ]]–
Drag folder into your resource folder, ensure tyredamage in server.cfg.
–[[ SETTINGS ]]–
By default the script will set the vehicles HANDBRAKE once ALL of the tyres are popped.
Admin and Mech both will be set to true by default so all players will have full control of script.
Open client.lua and edit the settings in the cfg table.
On: --Turn the script on/off
Amt: --Amount of tyres needed to be popped before vehicle stops.
–“all”: All tyres needed to be popped.
–“half”: Half of all tyres needed to be popped.
–“quarter”: A quarter of all tyres needed to be popped.
–“3/4”: Three quarters of all tyres needed to be popped.
–Numbers 1 - 6: Specific amount of tyres.
Event: --What to do once the tyres are popped.
–“engine”: Turn engine off.
–“handbrake”: Activate handbrake.
–“grip”: Lose traction.
–“fire”: Set vehicle on fire.
–“explode”: Destroy vehicle. (This is considered by script to be a “fun” based event).
–“launch”: Just for fun. Launches vehicle into air.
–“gravity”: Another fun one. Lose all effects of gravity.
–“crash”: More fun. Accelerator stuck open and you will have no control of steering.
–“random”: Any of the normal events picked at random. (see cfg.ev)
–“randomfun”: Include fun based events. (see cfg.evf)
–“custom”: Edit cfg.custom below to add custom functions.
Custom: --An easy way for users to add their own events without having to edit the base script.
–Remove the --[[ & --]] from the custom lines to use custom functions. If you are adding more than one dont forget to put a… --…comma between the functions after the }. Custom functiions will be chosen at random if there is more than one.
Timer: --Add a timer before vehicle stops. (multiplied by 100, timer will increase 1 per frame until it reaches value) (nil or 0+)
Breakable Engine: --Set engine health to 0.0 once tyres have popped. (will start to decrease if you crash)
Fixable: --If set to true then script will auto-detect when a vehicle has been repaired by other scripts. False will mean that only .players assigned as an admin or mechanic on their client script can reset vehicles using \tyfix.
Hazards: --Enable hazard lights once vehicle is disabled. (turn signals)
Admin: --Is client assigned as an admin. Admin can also use all mechanic features.
login: --/command to sign in as an admin.
Password: --Password to sign in as an admin. (ex: /tylogin password1)
Mech: --Is client assigned as a mechanic? Mechanics can fix vehicles using command /tyfix.
mLogin: --/command to sign in as an mechanic.
mPwd: --Password to sign in as an mechanic. (ex: /tymech password2)
Unique: --Add vehicles with a unique amount of tyres. (id = veh-hash, wh = wheel-ID’s)
–For example the “Raptor” has 2 wheels on the front and 1 wheel on back.
Except: --Blacklisted vehicles that cant be stopped if tyres are popped. By default cop cars, boats and helicopters are ignored.
–Numbers will ignore the whole vehicle class (example: 14 will ignore all boats)
–Strings will ignore the specific vehicles (example: “fbi” will ignore the FBI car)
Test: --Enable test/debug mode. (enables you to pop tyres one by one and then reset)
On: --Activate test mode.
But: --Buttom to press to pop tyres (use “dpad.” + button, example: dpad.r), see top of client script for button names)
Dbug: --Show vehicle & tyre info
NOTE: Type /tyi in chat to see all commands in console. (you have to be admin to do this)