Static Permission - means permissions that are already signed to the player in ACE System or Alternative Permissions
Temp Permission won't be sent to player if he is not fully loaded and fiveguard didn't fully load on his client-side
Parameters:
playerSource: The player handle
category: Permission Category (example: Client or AdminMenu)
permission: Permission (example: AdminMenuAccess for AdminMenu or BypassSuperJump for Client)
allow: true or false | default: false
ignoreStaticPermission: ignores static permission (setting it on true will ignore permissions already made in ace or alternative permissions)
Returns:
true if permission was set successfuly and errorText as nil, if not then false and errrorText will contain the error message
playerSource: The player handle
time: How long will video take (in milliseconds)
handler: function and it will return url in first parameter
custom_url: url where video will be sent (leave empty if fiveguard should use Screenshot Storage Webhook)
Returns:
url in handler first parameter
error in handler second parameter (nil if there is no error)
Example Code
RegisterCommnad("player_record", function(source, args, rawCommand)
exports["anticheat-name"]:recordPlayerScreen(args[1], 3000, function(url, err)
if err then
return print("failed to take video: "..err)
end
print("recorded video: "..url)
end)
end, true)
playerSource: The player handle
handler: function and it will return url in first parameter
custom_url: url where screenshot will be sent (leave empty if fiveguard should use Screenshot Storage Webhook)
Returns:
url in handler first parameter
error in handler second parameter (nil if there is no error)
Example Code
exports["anticheat-name"]:screenshotPlayer(source, function(url, err)
if err then
return print("failed to take screenshot: "..err)
end
print("got url of screenshot: ".. url .." from player: "..source)
end)
EventName: the event name that should be protected by Safe-Events System
config: the config to specify if Safe-Events System should ban (and log) or just log { log = true, ban = true }
cross_scripts: if true then all resources can use specific event through ExecuteServerEvent export
Returns:
true if event has been registered successfuly and errorText as nil, if not then false and errorText will contain the error message
Verify Token (Safe Events System)
local result --[[ boolean ]] =
exports["anticheat-name"]:VerifyToken(
playerSource --[[ integer ]]
)
Parameters:
playerSource: The player handle
Returns:
true if player sent good token to server
Example Of Code
--[[
local allEvents = {
["taxi:pay"] = false
}
local fiveguard_resource = ""
AddEventHandler("fg:ExportsLoaded", function(fiveguard_res, res)....
]]
-- Code for registering Safe Event
RegisterNetEvent("taxi:pay")
AddEventHandler("taxi:pay", function(money)
local source = source
if not exports[fiveguard_resource]:VerifyToken(source) then return end
-- rest of instructions
end)