🍿Exports
Are you ready to make your own anticheat?
Exports provide a method for implementing player punishments within your server-side scripts. Consider a scenario where a player attempts to exploit a script, and your code initially handles this by instantly disconnecting the player:
if player == abuser then
dropPlayer(player)
end
However, Pegasus offers a more refined solution than mere disconnection. We provide you with the framework for executing Pegasus punishments. You can create a command like this:
if player == abuser then
--
-- Rest of your script code
--
local action = "WARN" -- Here, specify "KICK" or "BAN" as needed
local reason = "Player is an Abuser"
local details = "The player attempted to misuse my qb-clothing script for malicious purposes"
local screenshot = true -- (Do you want to include a screenshot?)
exports["PegasusAC"]:PunishMePlease(source, action, reason, details, screenshot)
--
-- Rest of your script code
--
end
By using this approach, you ensure that Pegasus comprehends your intentions. You can define the "action," "reason," "details," and "screenshot" variables to convey the appropriate context to Pegasus. If, for example, you want to kick the player, set "action" to "KICK" or "BAN" for banning.
In this way, you've created an export. Below is an image demonstrating the export we've just constructed:
