Open methods
We have some open methods on both the client and server of badge. With these you can change anti abuse measures, and add your own checks for different things.
OpenMethods = {}
RegisterKeyMapping("+openbadgemenu", "Police Badge Menu", "keyboard", "g")
function OpenMethods.canOpenBadgeMenu() -- Define if the player can open the badge menu
--[[if exports['ox_inventory']:IsOpen() or exports["lb-phone"]:IsOpen() or exports['qs-inventory']:inInventory() then
return false
end]]
return true
end
function OpenMethods.canShowBadge() -- Define if the player can show their badge
--[[if exports['ox_inventory']:IsOpen() or exports["lb-phone"]:IsOpen() or exports['qs-inventory']:inInventory() then
return false
end]]
return true
end
function OpenMethods.drawMarker() -- Draw the marker for the badge boss menu (Only if UseTarget is false)
local r, g, b, a = table.unpack(Config.Options.OfficeSettings.DrawMarkerColor)
DrawMarker(27, vector3(Config.Options.OfficeSettings.BadgeOffice.x, Config.Options.OfficeSettings.BadgeOffice.y, Config.Options.OfficeSettings.BadgeOffice.z - 1.0), vector3(0.0, 0.0, 0.0), vector3(0.0, 0.0, 0.0), vector3(1.0, 1.0, 1.0), r, g, b, a, false, false, 2, false, false, false)
end
Last updated