mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
fix(server/commands): return if player not found.
This commit is contained in:
@@ -84,6 +84,8 @@ lib.addCommand("setjob", {
|
||||
}
|
||||
}, function(source, args, raw)
|
||||
local player = NDCore.getPlayer(args.target)
|
||||
if not player then return end
|
||||
|
||||
local job = args.job:lower()
|
||||
local jobInfo = player.setJob(job, args.rank)
|
||||
if not player or not jobInfo then return end
|
||||
@@ -210,6 +212,7 @@ lib.addCommand("pay", {
|
||||
end
|
||||
|
||||
local player = NDCore.getPlayer(source)
|
||||
if not player then return end
|
||||
local success = player.deductMoney("cash", args.amount)
|
||||
|
||||
if not success then
|
||||
|
||||
Reference in New Issue
Block a user