I would like to spawn a Benson with the texture “Stay Frosty!”. I actually using this :
function SpawnVehicle(request)
local myPed = GetPlayerPed(-1)
local player = PlayerId()
local vehicle = GetHashKey(request)
RequestModel(vehicle)
while not HasModelLoaded(vehicle) do
Wait(1)
end
local coords = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0, 5.0, 0)
local spawned_car = CreateVehicle(vehicle, coords, 64.55118,116.613,78.69622, true, false)
SetVehicleOnGroundProperly(spawned_car)
SetPedIntoVehicle(myPed, spawned_car, - 1)
SetModelAsNoLongerNeeded(vehicle)
end
But now I don’t know how to set the “Stay Frosty!” skin. Thanks
function SpawnVehicle(request)
local myPed = GetPlayerPed(-1)
local player = PlayerId()
local vehicle = GetHashKey(request)
RequestModel(vehicle)
while not HasModelLoaded(vehicle) do
Wait(1)
end
local coords = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0, 5.0, 0)
local spawned_car = CreateVehicle(vehicle, coords, 64.55118,116.613,78.69622, true, false)
SetVehicleOnGroundProperly(spawned_car)
SetPedIntoVehicle(myPed, spawned_car, - 1)
SetModelAsNoLongerNeeded(vehicle)
if IsVehicleModel(spawned_car, GetHashKey("BENSON")) then
for i = 1, 14 do
if DoesExtraExist(spawned_car, i) then
SetVehicleExtra(spawned_car, i, 1)
end
end
SetVehicleExtra(spawned_car, 4, 0)
end
end
Speaking of Extras, I though coffee cups and other little things were part of extras but I’m unable to spawn them.
I even tried to copy all extras (0-14) from an existing car with coffee near the dashboard to a new one (same model) and it’s not here.
I tried also to copy liveries, mods but I can’t get it to spawn…