mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-18 06:26:01 +01:00
Adjust frameworkCache.lua to be table based
Reworked `frameworkCache.lua` to the new layout Fix possibility of invisible props/ peds/vehicles on spawn Start adding very basic and unfinished support for RedM VorpCore
This commit is contained in:
@@ -65,7 +65,6 @@ function makePed(data, coords, freeze, collision, scenario, anim, synced, fade)
|
||||
model = data.model
|
||||
loadModel(data.model)
|
||||
ped = CreatePed(0, model, coords.x, coords.y, coords.z - 1.03, coords.w, synced and synced or false, false)
|
||||
SetEntityAlpha(ped, 0, false)
|
||||
-- Inheritance
|
||||
SetPedHeadBlendData(ped, data.custom.faceFather, data.custom.faceMother, data.custom.raceShape, data.custom.skinFather, data.custom.skinMother, data.custom.raceSkin, data.custom.faceMix or 0, data.custom.skinMix or 0, data.custom.raceMix or 0, false)
|
||||
|
||||
@@ -145,7 +144,8 @@ function makePed(data, coords, freeze, collision, scenario, anim, synced, fade)
|
||||
end
|
||||
unloadModel(model)
|
||||
Peds[keyGen()..keyGen()] = ped
|
||||
if fade ~= false then
|
||||
if fade ~= false and gameName ~= "rdr3" then
|
||||
SetEntityAlpha(ped, 0, false)
|
||||
CreateThread(function()
|
||||
fadeInEnt(ped)
|
||||
end)
|
||||
|
||||
@@ -24,14 +24,14 @@ local distProps = {}
|
||||
function makeProp(data, freeze, synced, fade)
|
||||
loadModel(data.prop)
|
||||
local prop = CreateObject(data.prop, data.coords.x, data.coords.y, data.coords.z-1.03, synced and synced or false, synced and synced or false, false)
|
||||
SetEntityAlpha(veh, 0, false)
|
||||
SetEntityHeading(prop, (data.coords.w or 0) + 180.0)
|
||||
FreezeEntityPosition(prop, freeze or false)
|
||||
|
||||
debugPrint("^6Bridge^7: ^1Prop ^2Created^7: '^6"..prop.."^7' | ^2Hash^7: ^7'^6"..data.prop.."^7' | ^2Coord^7: "..formatCoord(data.coords))
|
||||
SetModelAsNoLongerNeeded(data.prop)
|
||||
Props[keyGen()..keyGen()] = prop
|
||||
if fade ~= false then
|
||||
if fade ~= false and gameName ~= "rdr3" then
|
||||
SetEntityAlpha(prop, 0, false)
|
||||
CreateThread(function()
|
||||
fadeInEnt(prop)
|
||||
end)
|
||||
|
||||
@@ -30,7 +30,7 @@ function makeVeh(model, coords, synced, fade)
|
||||
debugPrint("^6Bridge^7: ^1Veh ^2Created^7: '^6"..veh.."^7' | ^2Hash^7: ^7'^6"..model.."^7' | ^2Coord^7: "..formatCoord(coords))
|
||||
unloadModel(model)
|
||||
Vehicles[#Vehicles + 1] = veh
|
||||
if fade ~= false then
|
||||
if fade ~= false and gameName ~= "rdr3" then
|
||||
SetEntityAlpha(veh, 0, false)
|
||||
CreateThread(function()
|
||||
fadeInEnt(veh)
|
||||
|
||||
Reference in New Issue
Block a user