🔰exports/handlers

In api we have some exports & handlers here you will find list

  1. ban

exports['here_put_api_script_name']:ban(source, "here_put_reason") 
-- It putting someone to API banlist and it dropping him from server. 
Simple ban with api. EXPORT IS SERVER-SIDED example.
exports['minerixon']:ban(source, "Exploiting event without job.") 
minerixon is api folder, source is source from event and next to source is reason.
  1. getAllPlayerIdentifiers

exports['here_put_api_script_name']:getAllPlayerIdentifiers(source, boolean) 
- Use it if u want to get someones identifiers with API. 
boolean is true or false
If u set it to true API will return 1 table with every identifier even with tokens
if u set false then api will return you named table you can get from it: steam, license, ip, discord, liveid, xbl, name example.
true:

local identifiers = exports['minerixon']:getAllPlayerIdentifiers(source, true)

for k,v in pairs(identifiers) do
    print(v)    -- v return every identifier!
end

false:

local identifiers = exports['minerixon']:getAllPlayerIdentifiers(source, false) -- it contains steam, license, ip, discord, liveid, xbl, name

print(identifiers.name)
print(identifiers.license)
  1. addPlayerPermission

  • Export is server sided.

    • You can call it like that example: exports['name_of_ac_folder']:addPlayerPermission(source, "bypass", true)

    • You can add it to your framework if you want to give someone permissions when he get role from server.

    exports['name_of_ac_folder']:addPlayerPermission(source, "bypass", true)

HANDLERS:

  1. API:BanACHandler

    AddEventHandler("API:BanACHandler", function(PlayerID, PlayerName, BanReason)
        -- you can write your code here.
    end)

So you can execute your code ex. Chat message for all/admins etc.

Last updated