Try
RegisterCommand('wl9', function(source, args, rawCommand)
local x,y,z = table.unpack(GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 8.0, 0.5))
vehiclehash = "wl9"
RequestModel(vehiclehash)
Citizen.CreateThread(function()
CreateVehicle(vehiclehash, x, y, z, GetEntityHeading(PlayerPedId())+90, 1, 0)
end)
end)
Might not work idk, just wrote it in about 10 seconds
Also in future to format code use the (`) symbol to format it.
View the below to see more, I kinda based mine off of it, but this is a script you might like