mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-11-02 01:15:04 +00:00
Fixed errors to pay commands
This commit is contained in:
1 parent
b90b6bc75d
commit
d3bf85bd5b
1 file changed
+17
-6
@@ -53,18 +53,29 @@ end
|
||||
|
||||
if config["pay"] then
|
||||
RegisterCommand("pay", function(source, args, rawCommand)
|
||||
local player = source
|
||||
local target = tonumber(args[1])
|
||||
local amount = tonumber(args[2])
|
||||
NDCore.Functions.TransferBank(amount, player, target)
|
||||
local player = source
|
||||
local target = tonumber(args[1])
|
||||
local amount = tonumber(args[2])
|
||||
if target and amount ~= nil then
|
||||
NDCore.Functions.TransferBank(amount, player, target)
|
||||
else
|
||||
-- Wrong syntax, it's /pay <id> <amount>
|
||||
TriggerClientEvent('chatMessage', source, '^1ERROR: Wrong usage. /pay <id> <amount>')
|
||||
end
|
||||
|
||||
end, false)
|
||||
end
|
||||
|
||||
if config["give"] then
|
||||
RegisterCommand("give", function(source, args, rawCommand)
|
||||
local player = source
|
||||
local amount = tonumber(args[2])
|
||||
NDCore.Functions.GiveCashToNearbyPlayer(player, amount)
|
||||
local amount = tonumber(args[1])
|
||||
if amount ~= nil then
|
||||
NDCore.Functions.GiveCashToNearbyPlayer(player, amount)
|
||||
else
|
||||
-- Wrong syntax, it's /give <amount>
|
||||
TriggerClientEvent('chatMessage', source, '^1ERROR: Wrong usage. /give <amount>')
|
||||
end
|
||||
end, false)
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user