mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
Update server.lua
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user