/mh-vehiclemodels

This give you the real model name for a vehicle,

Primary LanguageLuaGNU General Public License v3.0GPL-3.0

Hi 👋, I'm MaDHouSe

A passionate allround developer

🙈 Youtube

MH Model Names (Standalone)

  • This give you the real model name for a vehicle,
  • sometimes a vehicle does not give you the correct spawn name,
  • with this you get the correct spawn name.
  • you can use this to save in to a database.

Install

  • make sure you start this resources before qc-core or esx

Example GetModelName function

-- Use this if a spawnname does nog match with the one you want. -- with this you replace the name to the correct spawnname.

local model = exports['mh-vehiclemodels']:GetModelName(vehicle)
print(model)

Example To Get an offset of a vehicle

  • function GetVehicleOffsetX -- left/right
  • function GetVehicleOffsetY -- front/back
  • function GetVehicleOffsetZ -- up/down
local offsetX = exports['mh-vehiclemodels']:GetVehicleOffsetX(vehicle)
local offsetY = exports['mh-vehiclemodels']:GetVehicleOffsetY(vehicle)
local offsetZ = exports['mh-vehiclemodels']:GetVehicleOffsetZ(vehicle)
print(offsetX, offsetY, offsetZ)

----------------------------------------------------------------------

Example GetVehicleOffset function

local offsetX, offsetY, offsetZ = exports['mh-vehiclemodels']:GetVehicleOffset(vehicle)
print(offsetX, offsetY, offsetZ)

----------------------------------------------------------------------