mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
Version Bump + small formatting changes
This commit is contained in:
8
atms.lua
8
atms.lua
@@ -336,9 +336,7 @@ RegisterNetEvent('jim-payments:client:ATM:give', function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
AddEventHandler('onResourceStop', function(resource)
|
AddEventHandler('onResourceStop', function(resource) if resource ~= GetCurrentResourceName() then return end
|
||||||
if resource == GetCurrentResourceName() then
|
for k, v in pairs(Targets) do exports['qb-target']:RemoveZone(k) end
|
||||||
for k, v in pairs(Targets) do exports['qb-target']:RemoveZone(k) end
|
for k, v in pairs(Peds) do DeletePed(Peds[k]) end
|
||||||
for k, v in pairs(Peds) do DeletePed(Peds[k]) end
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
@@ -11,7 +11,6 @@ local function cv(amount)
|
|||||||
return formatted
|
return formatted
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---- BANK STUFF
|
---- BANK STUFF
|
||||||
QBCore.Functions.CreateCallback('jim-payments:ManageWrapper', function(source, cb, type, account)
|
QBCore.Functions.CreateCallback('jim-payments:ManageWrapper', function(source, cb, type, account)
|
||||||
local result = nil
|
local result = nil
|
||||||
|
|||||||
16
client.lua
16
client.lua
@@ -3,13 +3,15 @@ local QBCore = exports['qb-core']:GetCoreObject()
|
|||||||
PlayerJob = {}
|
PlayerJob = {}
|
||||||
local onDuty = false
|
local onDuty = false
|
||||||
local BankPed = {}
|
local BankPed = {}
|
||||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded') AddEventHandler('QBCore:Client:OnPlayerLoaded', function() QBCore.Functions.GetPlayerData(function(PlayerData) PlayerJob = PlayerData.job PlayerGang = PlayerData.gang end) end)
|
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() QBCore.Functions.GetPlayerData(function(PlayerData) PlayerJob = PlayerData.job PlayerGang = PlayerData.gang end) end)
|
||||||
RegisterNetEvent('QBCore:Client:OnJobUpdate') AddEventHandler('QBCore:Client:OnJobUpdate', function(JobInfo) PlayerJob = JobInfo onDuty = PlayerJob.onduty end)
|
RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo) PlayerJob = JobInfo onDuty = PlayerJob.onduty end)
|
||||||
RegisterNetEvent('QBCore:Client:SetDuty') AddEventHandler('QBCore:Client:SetDuty', function(duty) onDuty = duty end)
|
RegisterNetEvent('QBCore:Client:SetDuty', function(duty) onDuty = duty end)
|
||||||
RegisterNetEvent('QBCore:Client:OnGangUpdate') AddEventHandler('QBCore:Client:OnGangUpdate', function(GangInfo) PlayerGang = GangInfo end)
|
RegisterNetEvent('QBCore:Client:OnGangUpdate', function(GangInfo) PlayerGang = GangInfo end)
|
||||||
|
|
||||||
--Keeps track of duty on script restarts
|
--Keeps track of duty on script restarts
|
||||||
AddEventHandler('onResourceStart', function(resource) if GetCurrentResourceName() == resource then QBCore.Functions.GetPlayerData(function(PlayerData) PlayerJob = PlayerData.job PlayerGang = PlayerData.gang onDuty = PlayerJob.onduty end) end end)
|
AddEventHandler('onResourceStart', function(resource) if GetCurrentResourceName() ~= resource then return end
|
||||||
|
QBCore.Functions.GetPlayerData(function(PlayerData) PlayerJob = PlayerData.job PlayerGang = PlayerData.gang onDuty = PlayerJob.onduty end)
|
||||||
|
end)
|
||||||
|
|
||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
local jobroles = {}
|
local jobroles = {}
|
||||||
@@ -83,6 +85,6 @@ end)
|
|||||||
RegisterNetEvent('jim-payments:Tickets:Sell:yes', function() TriggerServerEvent('jim-payments:Tickets:Sell') end)
|
RegisterNetEvent('jim-payments:Tickets:Sell:yes', function() TriggerServerEvent('jim-payments:Tickets:Sell') end)
|
||||||
RegisterNetEvent('jim-payments:Tickets:Sell:no', function() exports['qb-menu']:closeMenu() end)
|
RegisterNetEvent('jim-payments:Tickets:Sell:no', function() exports['qb-menu']:closeMenu() end)
|
||||||
|
|
||||||
AddEventHandler('onResourceStop', function(resource)
|
AddEventHandler('onResourceStop', function(resource) if resource ~= GetCurrentResourceName() then return end
|
||||||
if resource == GetCurrentResourceName() then exports['qb-target']:RemoveZone("JimBank") DeletePed(BankPed[1]) end
|
exports['qb-target']:RemoveZone("JimBank") DeletePed(BankPed[1])
|
||||||
end)
|
end)
|
||||||
14
config.lua
14
config.lua
@@ -1,4 +1,4 @@
|
|||||||
print("Jim-Payments v2.4 - Payments Script by Jimathy")
|
print("Jim-Payments v2.5 - Payments Script by Jimathy")
|
||||||
|
|
||||||
-- If you need support I now have a discord available, it helps me keep track of issues and give better support.
|
-- If you need support I now have a discord available, it helps me keep track of issues and give better support.
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ Config = {}
|
|||||||
|
|
||||||
Config.Debug = false
|
Config.Debug = false
|
||||||
|
|
||||||
Config.Manage = true -- "true" if using qb-management
|
Config.Manage = false -- "true" if using qb-management
|
||||||
-- "false" if using qb-bossmenu
|
-- "false" if using qb-bossmenu
|
||||||
|
|
||||||
Config.TicketSystem = true -- Enable this if you want to use the ticket system false
|
Config.TicketSystem = true -- Enable this if you want to use the ticket system false
|
||||||
@@ -34,7 +34,7 @@ Config.PedPool = {
|
|||||||
[14] = `U_F_M_CasinoShop_01`,
|
[14] = `U_F_M_CasinoShop_01`,
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.Gabz = false -- "true" to enable Gabz Banking locations
|
Config.Gabz = true -- "true" to enable Gabz Banking locations
|
||||||
Config.useATM = true -- Enable this to use my ATM's
|
Config.useATM = true -- Enable this to use my ATM's
|
||||||
Config.useBanks = true -- Enable this to use my banking stuff
|
Config.useBanks = true -- Enable this to use my banking stuff
|
||||||
Config.BankBlips = true -- Enable this if you disabled qb-banking and need bank locations
|
Config.BankBlips = true -- Enable this if you disabled qb-banking and need bank locations
|
||||||
@@ -75,7 +75,7 @@ Config.Jobs = {
|
|||||||
Config.ATMModels = {"prop_atm_01", "prop_atm_02", "prop_atm_03", "prop_fleeca_atm" }
|
Config.ATMModels = {"prop_atm_01", "prop_atm_02", "prop_atm_03", "prop_fleeca_atm" }
|
||||||
|
|
||||||
Config.GabzATMLocations = {
|
Config.GabzATMLocations = {
|
||||||
--PACIFIC BANK 8 ATMS (GABZ)
|
--PACIFIC BANK 12 ATMS (GABZ)
|
||||||
vector3(239.02, 212.37, 106.28),
|
vector3(239.02, 212.37, 106.28),
|
||||||
vector3(239.46, 213.6, 106.28),
|
vector3(239.46, 213.6, 106.28),
|
||||||
vector3(239.9, 214.82, 106.28),
|
vector3(239.9, 214.82, 106.28),
|
||||||
@@ -84,6 +84,10 @@ Config.GabzATMLocations = {
|
|||||||
vector3(241.86, 220.16, 106.28),
|
vector3(241.86, 220.16, 106.28),
|
||||||
vector3(242.3, 221.41, 106.28),
|
vector3(242.3, 221.41, 106.28),
|
||||||
vector3(242.76, 222.63, 106.28),
|
vector3(242.76, 222.63, 106.28),
|
||||||
|
vector3(263.46, 203.86, 106.28),
|
||||||
|
vector3(263.96, 205.03, 106.28),
|
||||||
|
vector3(264.37, 206.28, 106.28),
|
||||||
|
vector3(264.77, 207.51, 106.28),
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.VanATMLocations = {
|
Config.VanATMLocations = {
|
||||||
@@ -214,5 +218,5 @@ Config.GabzBankLocations = {
|
|||||||
vector4(263.71, 212.63, 106.28, 337.53), -- Pacficic Gabz 7+8
|
vector4(263.71, 212.63, 106.28, 337.53), -- Pacficic Gabz 7+8
|
||||||
vector4(259.02, 214.32, 106.28, 337.82), -- Pacficic Gabz 9+10
|
vector4(259.02, 214.32, 106.28, 337.82), -- Pacficic Gabz 9+10
|
||||||
vector4(254.27, 216.06, 106.28, 336.37), -- Pacficic Gabz 11+12
|
vector4(254.27, 216.06, 106.28, 336.37), -- Pacficic Gabz 11+12
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
name "Jim-Payments"
|
name "Jim-Payments"
|
||||||
author "Jimathy"
|
author "Jimathy"
|
||||||
version "v2.4"
|
version "v2.5"
|
||||||
description "Payment Script By Jimathy"
|
description "Payment Script By Jimathy"
|
||||||
fx_version "cerulean"
|
fx_version "cerulean"
|
||||||
game "gta5"
|
game "gta5"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ local function cv(amount)
|
|||||||
return formatted
|
return formatted
|
||||||
end
|
end
|
||||||
|
|
||||||
AddEventHandler('onResourceStart', function(resource)
|
AddEventHandler('onResourceStart', function(resource) if GetCurrentResourceName() ~= resource then return end
|
||||||
if GetCurrentResourceName() == resource then for k, v in pairs(Config.Jobs) do if not QBCore.Shared.Jobs[k] then print("Jim-Payments: Config.Jobs searched for job '"..k.."' and couldn't find it in the Shared") end end end
|
for k, v in pairs(Config.Jobs) do if not QBCore.Shared.Jobs[k] then print("Jim-Payments: Config.Jobs searched for job '"..k.."' and couldn't find it in the Shared") end end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
QBCore.Commands.Add("cashregister", "Use mobile cash register", {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, {}, true) end)
|
QBCore.Commands.Add("cashregister", "Use mobile cash register", {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, {}, true) end)
|
||||||
|
|||||||
Reference in New Issue
Block a user