Update server.lua

This commit is contained in:
Andyyy7666
2022-09-18 01:15:08 +02:00
committed by GitHub
parent ce9d70f3ed
commit cd3e3ab21b

View File

@@ -34,6 +34,10 @@ end)
RegisterNetEvent("ND_CharacterSelection:editCharacter", function(newCharacter)
local player = source
-- check if player owns the character.
local characters = NDCore.Functions.GetPlayerCharacters(player)
if not characters[newCharacter.id] then return end
-- validate that the person has permission to use the department.
local departmentCheck = validateDepartment(player, newCharacter.job)
if not departmentCheck then return end
@@ -76,4 +80,4 @@ if config.departmentPaychecks then
end
end
end)
end
end