Car spawn

I have a LUA menu iam trying to write to spawn a car how would i add this and what would it say
cheers, pointers would be great in the toolbox.lua

would it be this?

SET_ALL_VEHICLES_SPAWN #
// 0xE023E8AC4EF7C117 0xA0909ADB
// SetAllVehiclesSpawn
Any SET_ALL_VEHICLES_SPAWN(Vehicle p0, BOOL p1, BOOL p2, BOOL p3);
Most likely a hash collision

any pointers would massively help me

“most likely a hash collision” meaning it probably is not the native name that it should be.

To spawn a vehicle, use this:

CreateVehicle(hash modelHash, float x, float y, float z, float heading, bool isNetwork, bool thisScriptCheck)

source

So

CreateVehicle(hash policeHash, float x, float y, float z, float heading, bool isNetwork, bool thisScriptCheck)

local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(), true))
local veh = CreateVehicle(“police”, x, y, z, 0.0, true, false)

thank you,
iam just going to try this,

crop2

crop3

nope dont work, - wont open the menu

You never mentioned anything about a menu in your original post. What kind of menu? What resource are you using? What’s your full script look like? Did you ask for help in the thread for the menu resource you’re using?

hi thank you iam trying to add a car spawn the menu,
[Release] Server Roleplay Toolbox

men