Server Exports
All server-side exports available to other resources.
Group Management
lua
-- Create a group
exports['wtf_group']:CreateGroup(leaderSrc, groupType) → groupId
-- Disband a group
exports['wtf_group']:DisbandGroup(groupId)
-- Get group info
exports['wtf_group']:GetGroup(groupId) → table|nil
exports['wtf_group']:GetPlayerGroup(citizenid) → table|nil
-- Member management
exports['wtf_group']:AddMember(groupId, citizenid, name, role)
exports['wtf_group']:RemoveMember(groupId, citizenid)
exports['wtf_group']:GetMembers(groupId) → array
exports['wtf_group']:IsMember(groupId, citizenid) → boolean
-- Lock/Cooldown
exports['wtf_group']:SetLocked(groupId, locked)
exports['wtf_group']:SetCooldown(groupId, seconds)
exports['wtf_group']:GetCooldown(groupId) → secondsTasks
lua
exports['wtf_group']:CreateTask(groupId, taskType, title, description, instructions, data)
exports['wtf_group']:CompleteTask(taskId)
exports['wtf_group']:FailTask(taskId)
exports['wtf_group']:GetGroupTasks(groupId) → arrayRoles
lua
exports['wtf_group']:AssignRole(groupId, citizenid, role, assignedBy)
exports['wtf_group']:RemoveRole(groupId, citizenid)
exports['wtf_group']:GetPlayerRole(groupId, citizenid) → string|nilReputation
lua
exports['wtf_group']:GetReputation(groupId) → table
exports['wtf_group']:AddXP(groupId, amount)Alliances
lua
exports['wtf_group']:CreateAlliance(groupA, groupB, createdBy)
exports['wtf_group']:DeleteAlliance(groupA, groupB)
exports['wtf_group']:GetAlliances(groupId) → arrayTurfs
lua
exports['wtf_group']:ClaimTurf(groupId, name, x, y, z, radius, color, income, claimedBy)
exports['wtf_group']:RemoveTurf(turfId)
exports['wtf_group']:GetGroupTurfs(groupId) → arrayBounties
lua
exports['wtf_group']:CreateBounty(groupId, title, description, reward, postedBy)
exports['wtf_group']:CompleteBounty(bountyId, completedBy)
exports['wtf_group']:GetGroupBounties(groupId) → arrayMailbox
lua
exports['wtf_group']:SendMail(groupId, senderCitizenid, subject, message, priority)
exports['wtf_group']:GetGroupMails(groupId) → arrayGarage
lua
exports['wtf_group']:AddVehicle(groupId, plate, model, displayName, mods, addedBy)
exports['wtf_group']:RemoveVehicle(plate)
exports['wtf_group']:GetGroupVehicles(groupId) → arrayTablet (App Data)
lua
exports['wtf_group']:SetAppData(citizenid, appId, key, value)
exports['wtf_group']:GetAppData(citizenid, appId, key) → any
exports['wtf_group']:DeleteAppData(citizenid, appId, key)
exports['wtf_group']:GetAllAppData(citizenid, appId) → tableTablet (Messaging)
lua
exports['wtf_group']:RegisterServerApp(config)
exports['wtf_group']:UnregisterServerApp(appId)
exports['wtf_group']:SendToClient(playerSource, appId, messageType, data)
exports['wtf_group']:SendNotification(playerSource, title, message, type, duration)
exports['wtf_group']:SendAppNotification(playerSource, appId, title, message, type, duration)
exports['wtf_group']:BroadcastToAll(appId, messageType, data)
exports['wtf_group']:GetRegisteredServerApps() → tableVPN
lua
-- Check if player has ANY VPN active
exports['wtf_group']:IsVpnConnected(source) → boolean
-- Check if player is connected to a SPECIFIC proxy
exports['wtf_group']:IsPlayerConnectedToProxy(source, proxyId) → boolean
-- Get active proxy ID (or nil)
exports['wtf_group']:GetPlayerActiveProxy(source) → string|nil
-- Admin: force connect player to proxy
exports['wtf_group']:ConnectPlayerToProxy(source, proxyId) → boolean
-- Admin: force disconnect player
exports['wtf_group']:DisconnectPlayerProxy(source) → boolean
-- Admin: generate a license key
exports['wtf_group']:GenerateLicenseKey(source, proxyId, permanent, duration) → stringVPN Usage Examples
lua
-- Dark market access check
RegisterNetEvent('darkmarket:enter', function()
local src = source
if not exports['wtf_group']:IsPlayerConnectedToProxy(src, 'darkweb') then
TriggerClientEvent('ox_lib:notify', src, {
description = 'You need Dark Web VPN to access this market',
type = 'error'
})
return
end
-- Allow access
end)
-- Check any VPN status
local isProtected = exports['wtf_group']:IsVpnConnected(source)
-- Get active proxy for RP logging
local proxy = exports['wtf_group']:GetPlayerActiveProxy(source)
if proxy then
print('Player using proxy: ' .. proxy)
end
-- Generate a key for a player
local keyCode = exports['wtf_group']:GenerateLicenseKey(source, 'darkweb', true, 0)
print('Key: ' .. keyCode)Auction
lua
-- Create an auction listing (returns listing ID)
exports['wtf_group']:CreateAuctionListing(data)
-- Get a listing by ID
exports['wtf_group']:GetAuctionListing(id) → table|nil
-- Get player's auction balance
exports['wtf_group']:GetAuctionBalance(source) → number
-- Get player's active listings
exports['wtf_group']:GetPlayerAuctions(source) → array
-- Check if player is auction admin
exports['wtf_group']:IsAuctionAdmin(source) → booleanContracts
lua
-- Check if a contract type is available (not in use, has stock)
exports['wtf_group']:IsContractAvailable(contractId) → boolean
-- Get active contract info for a type
exports['wtf_group']:GetActiveContract(contractId) → table|nil
-- Returns: { citizenid, groupId, startedAt }
-- Get start queue length for a contract type
exports['wtf_group']:GetContractQueueLength(contractId) → number
-- Report contract completion/failure
exports['wtf_group']:CompleteContract(source, contractId, missionId, success) → boolean, string
-- Get all active contracts across the server
exports['wtf_group']:GetActiveContracts() → table
-- Get a player's contract inventory
exports['wtf_group']:GetPlayerContracts(source) → array
-- Check if a player owns an active contract
exports['wtf_group']:HasActiveContract(source, contractId) → booleanContract Usage Examples
lua
-- Report heist completion from another resource
RegisterNetEvent('my_heist:completed', function(success)
local src = source
local missionId = 'mission_' .. os.time()
exports['wtf_group']:CompleteContract(src, 'gruppe6_heist', missionId, success)
end)
-- Check availability before allowing access
if exports['wtf_group']:IsContractAvailable('gruppe6_heist') then
print('Contract is free and in stock')
end
-- Get active contract info
local active = exports['wtf_group']:GetActiveContract('gruppe6_heist')
if active then
print('In use by: ' .. active.citizenid .. ' (group: ' .. active.groupId .. ')')
end
-- Check if a player owns a specific contract
local owns = exports['wtf_group']:HasActiveContract(source, 'gruppe6_heist')
-- Get all active contracts for admin display
local all = exports['wtf_group']:GetActiveContracts()
for contractId, info in pairs(all) do
print(contractId .. ' → ' .. info.citizenid)
endClient Exports
All client-side exports available to other resources.
Tablet Control
lua
exports['wtf_group']:OpenTablet()
exports['wtf_group']:CloseTablet()
exports['wtf_group']:ToggleTablet()
exports['wtf_group']:IsTabletOpen() → booleanApp Registration
lua
exports['wtf_group']:RegisterApp(config)
exports['wtf_group']:UnregisterApp(appId)
exports['wtf_group']:SendMessage(appId, messageType, data)
exports['wtf_group']:BroadcastMessage(appId, messageType, data)
exports['wtf_group']:OpenTablet() -- Open tablet
exports['wtf_group']:CloseTablet() -- Close tablet