mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-16 21:46:03 +01:00
Update commands.lua
Fixed vulnerability where modders would be able to change the aop, they will now be kicked :)
This commit is contained in:
@@ -10,8 +10,13 @@ local aop = "Unknown" -- aop unknown if it's not set.
|
||||
-- Aop command events
|
||||
RegisterNetEvent("registerAop")
|
||||
AddEventHandler("registerAop", function(aopRegistered)
|
||||
aop = aopRegistered
|
||||
TriggerClientEvent("setAop", -1, aop)
|
||||
local player = source
|
||||
if IsRolePresent(player, "ADMIN") then
|
||||
aop = aopRegistered
|
||||
TriggerClientEvent("setAop", -1, aop)
|
||||
else
|
||||
DropPlayer(player, "Tried to use a mod menu to change the aop.")
|
||||
end
|
||||
end)
|
||||
RegisterNetEvent("getAop")
|
||||
AddEventHandler("getAop", function()
|
||||
|
||||
Reference in New Issue
Block a user