mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
place start functions behind onResourceStart()
ESX helper
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
registerCommand("polcharge", {
|
||||
locale("command", "charge"), {}, false,
|
||||
function(source)
|
||||
TriggerClientEvent(getScript()..":client:PolCharge", source)
|
||||
end
|
||||
})
|
||||
onResourceStart(function()
|
||||
registerCommand("polcharge", {
|
||||
locale("command", "charge"), {}, false,
|
||||
function(source)
|
||||
TriggerClientEvent(getScript()..":client:PolCharge", source)
|
||||
end
|
||||
})
|
||||
end, true)
|
||||
|
||||
RegisterServerEvent(getScript()..":server:PolCharge", function(citizen, price)
|
||||
local src = source
|
||||
@@ -19,7 +21,7 @@ RegisterServerEvent(getScript()..":server:PolCharge", function(citizen, price)
|
||||
print("^3Warning^7: ^2Can't find player's job in ^7'Config.Polcharge.FineJobs', ^2defaulting to 0.25 (25% commission)^7")
|
||||
end
|
||||
local commission = math.floor(price * commPercent)
|
||||
print(commission)
|
||||
|
||||
if price > 0 then
|
||||
if not Config.PolCharge.FineJobConfirmation then
|
||||
polCharge({
|
||||
|
||||
Reference in New Issue
Block a user