Editable files
Client bridge/main.lua
local function LoadModel(model)
if HasModelLoaded(model) then return end
RequestModel(model)
while not HasModelLoaded(model) do Wait(0) end
end
self.Functions.AddAttachments = function(entity, attachments)
if not attachments then return end
if config.tgiann_attachments then
for _, data in pairs(attachments) do
local model = GetWeaponComponentTypeModel(data.component)
if model ~= 0 then
LoadModel(model, data.component)
GiveWeaponComponentToWeaponObject(entity, data.component)
SetModelAsNoLongerNeeded(data.component)
else
SetWeaponObjectTintIndex(entity, data.component)
end
end
else
for _, data in pairs(attachments) do
local model = GetWeaponComponentTypeModel(data.component)
if model ~= 0 then
LoadModel(model)
GiveWeaponComponentToWeaponObject(entity, data.component)
SetModelAsNoLongerNeeded(data.component)
else
SetWeaponObjectTintIndex(entity, data.component)
end
end
end
endClient Example Bridge
Last updated