Server
This is where all the magic works, below is the documentation of every function from bridge module.
IsPlayerAllowedToOpenMenu
This function determines if player that is trying to open admin menu should be added to database as an administrator. If it returns true player can open admin menu, but he can't do anything because he has no permissions set.
---@param targetId number
---@return boolean
IsPlayerAllowedToOpenMenu = function(targetId)
local xPlayer = ESX.GetPlayerFromId(targetId)
if IsPlayerAceAllowed(targetId, 'lc_adminmenu.open') then
return true
end
for i = 1, #allowed_groups do
if xPlayer.group == allowed_groups[i] then
return true
end
end
return false
endGetPermissionGroup
Permission GroupsGetAvatar
GetBridgeIdentifier
If your framework has character-specific identifiers, you can put it here. (char1:xxxxx etc.)
GetGlobalIdentifier
Rockstar license, you can change it to IP if you host an sv_lan server.
GetIdentifiers
GetPlayerCard

GetOwnedVehicles
lc_admin:getVehicleLabels callback executes Bridge.GetOwnedVehicleLabel, it's used to get vehicle labels from client-side
GetOwnedVehicleLabel

GetAccounts

GetAccountMoney
SetAccountMoney
GetCharacterInfo

DeleteVehicle
IsPlateTaken
AddVehicle
GetCharacterInfoToEdit
param is just name that is used later to save character edit

ValidateCharacterEdit
If this function returns false, the administrator will be notified that he entered invalid data.
SaveCharacterEdit
GetLicensesList
GetUserLicenses
src - ID of administrator that is trying to check player's licenses.
identifier - Target identifier received from Bridge.GetBridgeIdentifier function.
lc_admin:formatLicensecallback checks if any of user's license types are in the list from Bridge.GetLicensesList function, and then sets theactiveproperty to true or false.
ToggleUserLicense
SuccessNotify
InfoNotify
FailNotify
Last updated