mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-18 14:26:03 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4e9333ab8 |
@@ -110,7 +110,7 @@ end
|
|||||||
|
|
||||||
function makeProp(data, freeze, synced)
|
function makeProp(data, freeze, synced)
|
||||||
loadModel(data.prop)
|
loadModel(data.prop)
|
||||||
local prop = CreateObject(data.prop, data.coords.x, data.coords.y, data.coords.z-1.03, freeze or false, synced or false, false)
|
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)
|
||||||
SetEntityHeading(prop, data.coords.w + 180.0)
|
SetEntityHeading(prop, data.coords.w + 180.0)
|
||||||
FreezeEntityPosition(prop, freeze and freeze or 0)
|
FreezeEntityPosition(prop, freeze and freeze or 0)
|
||||||
if Config.System.Debug then
|
if Config.System.Debug then
|
||||||
@@ -387,7 +387,7 @@ RegisterNetEvent(GetCurrentResourceName()..":Server:ClearDUI", function(data)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
AddEventHandler('onResourceStop', function(r) if r ~= GetCurrentResourceName() then return end
|
AddEventHandler('onResourceStop', function(r) if r ~= GetCurrentResourceName() then return end
|
||||||
for k, v in pairs(duiList) do
|
for k, v in pairs(duiList or {}) do
|
||||||
for i = 1, #v do
|
for i = 1, #v do
|
||||||
RemoveReplaceTexture(tostring(v[i].tex.texd), tostring(v[i].tex.texn))
|
RemoveReplaceTexture(tostring(v[i].tex.texd), tostring(v[i].tex.texn))
|
||||||
end
|
end
|
||||||
@@ -849,6 +849,19 @@ function dupeWarn(src, item, amount)
|
|||||||
print("^5DupeWarn:^7: (^1"..tostring(src).."^7) ^2Dropped from server - exploit protection detected an item not being found in players inventory^7")
|
print("^5DupeWarn:^7: (^1"..tostring(src).."^7) ^2Dropped from server - exploit protection detected an item not being found in players inventory^7")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function breakTool(data) --wip
|
||||||
|
local durability, slot = getDurability(item)
|
||||||
|
durability -= data.damage
|
||||||
|
if not durability then durability = 100 end
|
||||||
|
if durability <= 0 then
|
||||||
|
removeItem(data.item, 1)
|
||||||
|
local breakId = GetSoundId()
|
||||||
|
PlaySoundFromEntity(breakId, "Drill_Pin_Break", PlayerPedId(), "DLC_HEIST_FLEECA_SOUNDSET", 1, 0)
|
||||||
|
else
|
||||||
|
TriggerServerEvent(GetCurrentResourceName()..":server:setMetaData", { item = data.item, slot = slot, metadata = { durability = durability }})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function getDurability(item)
|
function getDurability(item)
|
||||||
local lowestSlot = 100 -- anything above your players max slots
|
local lowestSlot = 100 -- anything above your players max slots
|
||||||
local durability = nil
|
local durability = nil
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name "Jim_Bridge"
|
name "Jim_Bridge"
|
||||||
author "Jimathy"
|
author "Jimathy"
|
||||||
version "1.0.13"
|
version "1.0.14"
|
||||||
description "Framework Bridge By Jimathy"
|
description "Framework Bridge By Jimathy"
|
||||||
fx_version "cerulean"
|
fx_version "cerulean"
|
||||||
game "gta5"
|
game "gta5"
|
||||||
|
|||||||
Reference in New Issue
Block a user