mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-16 22:06:02 +01:00
Compare commits
5 Commits
c6ef0897fc
...
35c95f500d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35c95f500d | ||
|
|
0da4cfb191 | ||
|
|
f723d6f444 | ||
|
|
26cf5f4cc9 | ||
|
|
f90161b82d |
@@ -3,23 +3,22 @@ local Till = {}
|
||||
|
||||
function spawnCustomRegisters()
|
||||
Wait(1000)
|
||||
for k, v in pairs(Config.CustomCashRegisters) do
|
||||
for i = 1, #v do
|
||||
local job, gang = v[i].gang and nil or k, v[i].gang and k or nil
|
||||
createBoxTarget({"CustomRegister: "..k..i, v[i].coords.xyz, 0.47, 0.34, { name="CustomRegister: "..k..i, heading = v[i].coords[4], debugPoly=debugMode, minZ=v[i].coords.z-0.1, maxZ=v[i].coords.z+0.4}}, {
|
||||
{
|
||||
action = function()
|
||||
TriggerEvent(getScript()..":client:Charge", { job = job, gang = gang, img = ""})
|
||||
end,
|
||||
for k, v in pairs(Config.CustomCashRegisters) do
|
||||
for i = 1, #v do
|
||||
local job, gang = v[i].gang and nil or k, v[i].gang and k or nil
|
||||
local img = v.img or v[i].img
|
||||
createBoxTarget({"CustomRegister: "..k..i, v[i].coords.xyz, 0.47, 0.34, {name="CustomRegister: "..k..i, heading = v[i].coords[4], debugPoly = debugMode, minZ = v[i].coords.z-0.1, maxZ = v[i].coords.z+0.4}}, {
|
||||
{
|
||||
action = function() TriggerEvent(getScript()..":client:Charge", {job = job, gang = gang, img = img}) end,
|
||||
icon = "fas fa-credit-card",
|
||||
label = locale("target", "charge"),
|
||||
label = locale("target","charge"),
|
||||
job = job,
|
||||
gang = gang
|
||||
}
|
||||
}, 2.0)
|
||||
if v[i].prop then makeProp({prop = "prop_till_03", coords = v[i].coords + vec4(0,0,1.0, 0.0)}, 1, false) end
|
||||
end
|
||||
end
|
||||
}, 2.0)
|
||||
if v[i].prop then makeProp({prop = "prop_till_03", coords = v[i].coords+vec4(0,0,1.0, 0.0)}, 1, false) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
onPlayerLoaded(function() spawnCustomRegisters() end, true)
|
||||
@@ -311,4 +310,6 @@ RegisterNetEvent(getScript()..":client:PayPopup", function(amount, biller, billt
|
||||
})
|
||||
end,
|
||||
})
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ Config = {
|
||||
|
||||
CustomCashRegisters = {
|
||||
-- ["jobname"] = { -- Player job role restriction
|
||||
-- img = "https://i.ibb.co/HfVy87fW/image.png", -- url to image file
|
||||
-- { coords = vector4(0, 0, 0, 0), }, -- vector4 to place the till and the way it faces
|
||||
-- { coords = vector4(0, 0, 0, 0), prop = true, }, -- "prop = true" spawns a prop at the coords
|
||||
-- },
|
||||
@@ -166,4 +167,5 @@ function locale(section, string)
|
||||
if not localTable[section] then return "["..section.."] Invalid" end
|
||||
if not localTable[section][string] then return "["..string.."] Invalid" end
|
||||
return localTable[section][string]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user