mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
Fixed errors to pay commands
This commit is contained in:
@@ -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