Open Aryaman-Pradhan-0306 opened 3 years ago
If you make the following changes in the files, players will be required to use the /onduty
command and have the correct ACE permissions to be able to go onduty as either Fire or LEO
client.lua Line 625 -> Line 671
RegisterCommand('onduty', function(source, args, rawCommand)
if Config.LEOAccess == 3 or Config.FireAccess == 3 then
if Config.OndutyPSWDActive then
if args[2] == Config.OndutyPSWD then
local Department = args[1]:lower()
if Department == 'leo' then
if LEOAce then
LEOOnduty = not LEOOnduty
if LEOOnduty then
Notify('~g~You are onduty as an LEO')
else
Notify('~o~You are no longer onduty as an LEO')
end
else
Notify('~r~Insufficient Permissions')
end
elseif Department == 'fire' then
if FireAce then
FireOnduty = not FireOnduty
if FireOnduty == true then
Notify('~g~You are onduty as an Firefighter')
else
Notify('~o~You are no longer onduty as an Firefighter')
end
else
Notify('~r~Insuffisient Permissions')
end
else
Notify('~r~Invalid Department!')
end
else
Notify('~r~Incorrect Password')
end
else
local Department = args[1]:lower()
if Department == 'leo' then
if LEOAce then
LEOOnduty = not LEOOnduty
if LEOOnduty then
Notify('~g~You are onduty as an LEO')
else
Notify('~o~You are no longer onduty as an LEO')
end
else
Notify('~r~Insufficient Permissions')
end
elseif Department == 'fire' then
if FireAce then
FireOnduty = not FireOnduty
if FireOnduty == true then
Notify('~g~You are onduty as an Firefighter')
else
Notify('~o~You are no longer onduty as an Firefighter')
end
else
Notify('~r~Insuffisient Permissions')
end
else
Notify('~r~Invalid Department!')
end
end
end
end)
config.lua Line 151
Config.LEOAccess = 3
Hello , Can I get some help with making this nice script work with Discord perms and at the same time /onduty and they also get a blip when they get onduty ? . its because i don't want people in the server to By-mistaken use the perms while on as civ