ifne
May 8, 2018, 7:05pm
1
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
ifne
May 10, 2018, 4:10pm
2
any pointers would massively help me
ifne:
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
“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
ifne
May 11, 2018, 1:49pm
4
Vespura:
CreateVehicle(hash modelHash, float x, float y, float z, float heading, bool isNetwork, bool thisScriptCheck)
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)
ifne
May 11, 2018, 2:08pm
6
thank you,
iam just going to try this,
ifne
May 11, 2018, 3:34pm
7
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?
ifne
May 11, 2018, 6:29pm
9
hi thank you iam trying to add a car spawn the menu,
[Release] Server Roleplay Toolbox