mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 01:38:52 +00:00
Resolved invalid number format
Setting jobs on players causes grade check to return an error rather than the check itself. `if PlayerData.job.grade >= 3 then` returns `Attempt to compare number with string`
This commit is contained in:
+2
-2
@@ -20,7 +20,7 @@ TriggerEvent('es:addGroupCommand', 'setjob', 'jobmaster', function(source, args,
|
||||
if tonumber(args[1]) and args[2] and tonumber(args[3]) then
|
||||
local xPlayer = ESX.GetPlayerFromId(args[1])
|
||||
if xPlayer ~= nil then
|
||||
xPlayer.setJob(args[2], args[3])
|
||||
xPlayer.setJob(args[2], tonumber(args[3]))
|
||||
else
|
||||
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Player not online.")
|
||||
end
|
||||
@@ -177,4 +177,4 @@ TriggerEvent('es:addGroupCommand', 'disconnect', 'admin', function(source, args,
|
||||
DropPlayer(source, 'You have been disconnected')
|
||||
end, function(source, args, user)
|
||||
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
|
||||
end, {help = _U('disconnect')})
|
||||
end, {help = _U('disconnect')})
|
||||
|
||||
Reference in New Issue
Block a user