mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
tweak(server/comands): setmoney help & player check
This commit is contained in:
@@ -35,16 +35,16 @@ lib.addCommand("setmoney", {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "amount",
|
name = "amount",
|
||||||
type = "number",
|
type = "number"
|
||||||
help = "bank/cash"
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}, function(source, args, raw)
|
}, function(source, args, raw)
|
||||||
local action = moneyActions[args.action]
|
local action = moneyActions[args.action]
|
||||||
local moneyType = args.type:lower()
|
local moneyType = args.type:lower()
|
||||||
if not action or not lib.table.contains(moneyTypes, moneyType) then return end
|
if not action or not lib.table.contains(moneyTypes, moneyType) then return end
|
||||||
|
|
||||||
local player = NDCore.getPlayer(args.target)
|
local player = NDCore.getPlayer(args.target)
|
||||||
|
if not player then return end
|
||||||
local staffMessage, userMessage = action(player, moneyType, args.amount)
|
local staffMessage, userMessage = action(player, moneyType, args.amount)
|
||||||
|
|
||||||
player.notify({
|
player.notify({
|
||||||
|
|||||||
Reference in New Issue
Block a user