Documentação 9.6.24
Integração do servidor
Use exports apenas em código confiável do servidor. O cliente não pode escolher exceções, privilégios ou recompensas.
Exemplo somente leitura#
O exemplo consulta o status de administrador e não concede acesso. Confira o export e formato de ID no pacote instalado.
local playerId = 12
local isAdmin = exports['tosun-ac']:isAdmin(playerId)Valide antes da exceção#
Confirme sessão, jogador, posição, permissão e duração no servidor. Nunca exponha exceções por RegisterNetEvent sem validação. Consulte a segurança da Cfx.
Aviso de teleporte#
Todo script de servidor que mova um jogador (casa, garagem, prisão, hospital, emprego) deve chamar MarkTeleport logo antes do teleporte. Não exige lista de confiança e só relaxa brevemente as verificações de movimento e visibilidade; as proteções de armas, dinheiro e injeção continuam ativas. Quando todos os scripts que teleportam enviarem o aviso, você pode elevar a punição de teleporte v16 para kick nas configurações do anticheat.
exports['tosun-ac']:MarkTeleport(source, 8000)
SetEntityCoords(GetPlayerPed(source), x, y, z)Recursos confiáveis#
Exports que isentam jogadores, concedem permissões ou executam ações em massa (SetExempt, addAdmin, whitelistPlayer e outros) só aceitam recursos confiáveis. Uma chamada recusada aparece uma vez no console com a linha a ser adicionada. Mantenha a lista no server.cfg para que as atualizações do anticheat não a sobrescrevam. O comando de console tosunac_integration mostra a lista confiável e as últimas chamadas recusadas.
set tosun_ac_trusted_resources "my-housing,my-clothing"Armas entregues fora do inventário#
Scripts que dão armas sem adicioná-las ao inventário, como arenas, paintball ou menus, devem chamar AllowWeapon ao entregar a arma. Caso contrário, a verificação de armas e inventário da 9.4.0 a registra como arma gerada. Informe um nome de arma ou um asterisco para todas; a duração máxima é de 1 hora. Adicione em extraWeapons na configuração as armas addon que o anticheat não conhece.
exports['tosun-ac']:AllowWeapon(source, "WEAPON_PISTOL", 600000)Manter autoridade no servidor#
Use TOSUN-AC-EXPORTS.md do pacote. Nomes diferenciam maiúsculas. Isenções usam milissegundos; AddWhitelist e WhitelistArea usam segundos. Inicie tosun-ac antes dos dependentes; trate recurso parado sem ignorar proteção. Sucesso não valida suas regras.
SetExempt e AllowWeapon exigem recurso servidor confiável. Adicione apenas revisados, preservando entradas. tosunac_integration mostra rejeições. Desligar enforcement permite chamadas em auditoria com avisos; não mantenha como solução permanente.
set tosun_ac_trusted_resources "my-clothing,my-arena"
# Console do servidor:
tosunac_integrationAvisar antes do teletransporte#
Valide jogador, destino servidor, permissão e atividade. Chame MarkTeleport imediatamente antes de mover. src e destination vêm do fluxo servidor validado, não de parâmetros livres do cliente. O fragmento não é evento de rede completo.
Não exige confiança. Relaxa movimento e visibilidade/godmode/câmera relacionados; armas, dinheiro, abuso e injection continuam. Com os valores padrão, para recursos fora da lista de confiança: 15 segundos por chamada, 180 por jogador em dez minutos. Extensões gastam orçamento; não chame cada tick.
-- Dentro de um fluxo servidor já validado:
local ok = exports["tosun-ac"]:MarkTeleport(src, 8000, "house_enter")
if ok then
SetEntityCoords(GetPlayerPed(src), destination.x, destination.y, destination.z)
endPermitir uma arma específica#
Em arenas sem item no inventário, valide partida servidor e chame AllowWeapon pelo recurso confiável. Prefira arma única e duração necessária. Afeta apenas posse e seu caminho de dano, não o AC inteiro.
Máximo uma hora; evite asterisco sem precisar de todas. SetExempt é isenção completa confiável até cinco minutos. BypassDetection ignora detectionKey: completa até um minuto, não uma verificação específica.
Não reutilize source de jogador desconectado para recompensa posterior. Confira sessão ao agir. Recurso confiável continua responsável por validar permissões e alvo.
- Ação autorizada funciona e permissão termina.
- Cliente não escolhe outro jogador, duração, arma ou destino.
- Chamada não confiável retorna false e aviso.
- Após reiniciar confira estado e ações normais.
-- my-arena: recurso confiável, sessão validada
local allowed = exports["tosun-ac"]:AllowWeapon(src, "WEAPON_PISTOL", 60000)
-- Dê a arma somente no fluxo de arena validado.Encerrar isenções pela API correta do servidor#
SetExempt servidor recebe src, milissegundos e motivo; no cliente recebe state, milissegundos e motivo. As assinaturas não são intercambiáveis. Uma isenção cliente não concede autoridade no servidor. Num fluxo confiável, SetPlayerExempt com state false remove a isenção temporária do jogador. Coordene atividades sobrepostas: esse estado abrange o jogador, não é um token independente por recurso. Removê-lo pode encerrar a isenção de outra atividade. Uma whitelist de equipe ou painel pode continuar deixando IsExemptFromPunish verdadeiro. Prefira MarkTeleport ou AllowWeapon quando o alcance menor bastar.
- Conclua ou cancele a atividade autorizada com jogador atual validado e retire a isenção desnecessária.
- Teste cancelamento, desconexão e conclusão normal; não prolongue isenção completa continuamente num loop.
- Confira com jogador comum se a proteção restante vem de equipe, whitelist do painel ou outra atividade.
-- Trusted server resource; src belongs to an authorised workflow.
-- Clear the temporary exemption when that workflow finishes or is cancelled.
local cleared = exports["tosun-ac"]:SetPlayerExempt(src, false, 0, "menu_finished")Usar auxiliares com política explícita de resultado#
Os auxiliares do bridge entram no manifesto do seu recurso e não substituem permissões. TosunAC.IsAvailable confere se AC iniciou; TosunAC.IsTrusted confere confiança do chamador. PlayerExempt retorna ok e mode: full é isenção completa confiável, soft é alívio limitado de movimento e visibilidade. Um resultado verdadeiro não significa imunidade completa. Se a atividade exige full, defina como interrompê-la ou recusá-la quando recebe só soft, sem continuar silenciosamente com outro alcance. PlayerExemptOff remove a isenção completa temporária pela API servidor.
- Carregue o auxiliar servidor antes do script que usa TosunAC e preserve as demais dependências do manifesto.
- Inspecione ok e mode no início; registre apenas recurso, motivo e resultado não secreto.
- Trate AC parado ou chamada recusada explicitamente; investigue ordem de início ou confiança antes de repetir.
-- Add these lines to your own resource manifest:
client_script "@tosun-ac/bridge/tosun_ac_client.lua"
server_script "@tosun-ac/bridge/tosun_ac_server.lua"Usar exports de leitura como diagnóstico#
GetStatus fornece resumo pequeno, incluindo framework configurado e jogadores online, não uma auditoria completa. GetIntegrationStatus descreve confiança do recurso chamador, não de todos os scripts. IsMovementExempt e IsExemptFromPunish respondem perguntas diferentes. GetDetections tem nome histórico: lê bans do jogador em ts_anticheat, não todos os logs recentes de detecção. Resultado vazio não certifica jogador limpo. Use consultas de base ou jogadores amplas sob demanda, não a cada tick. Utilize objetos devolvidos conforme documentação, sem credenciais ou dados pessoais desnecessários em depuração pública.
- Registre recurso chamador e consulta exata de estado ou isenção examinada no diagnóstico.
- Compare alcance esperado e resultado de um fluxo conhecido antes de mudar punições.
- Revise TOSUN-AC-EXPORTS.md instalado após atualizar, especialmente aliases antigos e ordem de parâmetros cliente/servidor.
Vincule o movimento adiado à conexão e à vida do resource#
Quando entrar numa casa exige uma pequena espera, guardar o número source do jogador não basta. Outra conexão pode reutilizar esse número após a desconexão. O trecho de server.lua é uma função local para um fluxo do servidor já autorizado, não um evento de rede acessível pelo cliente. O destino deve ser validado pelo servidor. Um objeto Lua único em pending associa o movimento adiado ao fluxo. A desconexão remove a entrada; o temporizador nada faz se não encontrar o mesmo objeto. Um novo jogador com o antigo source não recebe aquele movimento.
O exemplo limpa as entradas pendentes quando tosun-ac para ou o seu próprio resource encerra. Ao terminar a espera, verifica novamente estado do resource, presença do jogador e ped. pcall captura erros do export, e só há movimento quando MarkTeleport retorna true. Essas verificações não concedem propriedade da casa, função de emprego nem permissão do destino: confirme isso antes de chamar. O código apenas solicita tolerância de movimento; não remove isenções completas nem altera permissões de outros scripts. Teste separadamente desconectar durante a espera, parar AC e entrar normalmente. Não é necessário um ciclo permanente ou temporizador que percorra todos os jogadores; existe uma espera por fluxo iniciado.
-- server.lua: call only from an already authorised server workflow.
-- destination is a server-validated location, never raw client input.
local pending = {}
local function scheduleValidatedMove(src, destination)
src = tonumber(src)
if not src or not GetPlayerName(src) then return false end
if GetResourceState("tosun-ac") ~= "started" then return false end
local ticket = {}
local target = {x = destination.x, y = destination.y, z = destination.z}
pending[src] = ticket
SetTimeout(1500, function()
if pending[src] ~= ticket then return end
pending[src] = nil
if not GetPlayerName(src) then return end
if GetResourceState("tosun-ac") ~= "started" then return end
local ped = GetPlayerPed(src)
if not ped or ped == 0 then return end
local called, allowed = pcall(function()
return exports["tosun-ac"]:MarkTeleport(src, 8000, "house_delayed_entry")
end)
if called and allowed == true then
SetEntityCoords(ped, target.x, target.y, target.z)
end
end)
return true -- Scheduled, not yet moved.
end
AddEventHandler("playerDropped", function() pending[source] = nil end)
AddEventHandler("onResourceStop", function(name)
if name == GetCurrentResourceName() or name == "tosun-ac" then
pending = {}
end
end)Verifique a confiança dentro do resource que faz a integração#
Após editar a lista de confiança, coloque este diagnóstico no resource que efetuará a chamada real. O comando funciona apenas no console do servidor; chamadas de jogadores são ignoradas porque src não é zero. Execute my-resource-ac-check uma vez. GetIntegrationStatus devolve o nome do resource chamador e os valores trusted e enforcing. Portanto, true obtido noutro resource não comprova que o seu script de roupas ou arena seja confiável. GetStatus fornece um pequeno resumo de execução com versão e framework configurado, não uma auditoria de todas as integrações.
Mesmo quando pcall funciona, o retorno precisa ser uma tabela. Erro de chamada e resultado false são observações distintas; não declare a configuração verificada se o export não pôde ser chamado. Com trusted=false e enforcing=true, compare o nome chamador com a lista revisada. enforcing=false pode indicar uma configuração de auditoria; não comprova que todas as operações sensíveis estejam restritas com segurança. A saída contém apenas resource, versão, framework e dois booleanos, sem identificadores de jogadores ou chaves. Não execute em cada tick. Após atualizações, teste separadamente o fluxo normal e as recusas esperadas; diagnóstico de leitura não garante autorização para exports de punição.
-- Place in the integrating resource's server.lua.
RegisterCommand("my-resource-ac-check", function(src)
if src ~= 0 then return end -- Server console only.
if GetResourceState("tosun-ac") ~= "started" then
print("[integration] tosun-ac is not started")
return
end
local okTrust, trust = pcall(function()
return exports["tosun-ac"]:GetIntegrationStatus()
end)
local okStatus, status = pcall(function()
return exports["tosun-ac"]:GetStatus()
end)
if not okTrust or type(trust) ~= "table"
or not okStatus or type(status) ~= "table" then
print("[integration] status query failed")
return
end
print(("[integration] resource=%s version=%s framework=%s trusted=%s enforcing=%s")
:format(GetCurrentResourceName(), tostring(status.version),
tostring(status.framework), tostring(trust.trusted), tostring(trust.enforcing)))
end, false)Registrar eventos com validação no servidor#
Use RegisterSafeEvent no script do servidor. O nome do evento deve começar pelo recurso que registra. O validador deve retornar exatamente true após verificar jogador, tarefa, posição, itens e permissões no servidor. A chave do cliente não é permissão. Consuma a tarefa concluída uma vez para evitar recompensas duplicadas.
Use o export de cliente TriggerSafeServerEvent. sent só confirma o envio, não pagamento ou recompensa. queued_until_key aguarda no máximo 30 segundos; uma fila cheia rejeita novas chamadas. Não repita ações econômicas automaticamente. Registre novamente após reiniciar AC.
Migre e remova os handlers diretos RegisterNetEvent existentes. Tosun AC não pode cancelar handlers de outro recurso; manter a ação antiga permite contorno. Os handlers :safe de ProtectedEvents devem usar AddEventHandler apenas no servidor.
-- my-job/server.lua: own server-owned job state and framework adapter.
local activeJobs = {}
local function registerActions()
if GetResourceState("tosun-ac") ~= "started" then return end
local ok, reason = exports["tosun-ac"]:RegisterSafeEvent("my-job:finish",
function(src)
local job = activeJobs[src]
return job ~= nil and job.completed == true
-- Also verify server-owned position, role and inventory as required.
end,
function(src)
local job = activeJobs[src]
if not job then return end
activeJobs[src] = nil -- consume before any yielding reward operation
-- Give the server-owned reward through your validated framework adapter.
end, {rateLimit=5, windowMs=10000, maxArgs=0})
if not ok then print("[my-job] SafeEvent: " .. tostring(reason)) end
end
AddEventHandler("onResourceStart", function(name)
if name == GetCurrentResourceName() or name == "tosun-ac" then registerActions() end
end)
AddEventHandler("playerDropped", function() activeJobs[source] = nil end)
-- my-job/client.lua:
local sent, state = exports["tosun-ac"]:TriggerSafeServerEvent("my-job:finish")
-- Read state; implement a separate application acknowledgement if needed.
Configure o nome exato do recurso chamador#
Adicione set tosun_ac_trusted_resources "my-housing,my-clothing" ao server.cfg, preservando outros nomes revisados. Use o nome do recurso/pasta, não nome visível, jogador ou cargo Discord. Use set, não setr, e mantenha ts.EnforceExportCallerWhitelist = true. Confiança permite exports sensíveis; não valida propriedade, inventário, profissão ou alvo. Execute o diagnóstico no recurso que faz a ação e verifique trusted=true e enforcing=true.
set tosun_ac_trusted_resources "my-housing,my-clothing"
# txAdmin server console:
tosunac_integration
-- In the invoking integration resource server script:
local status = exports["tosun-ac"]:GetIntegrationStatus()
print(status.resource, status.trusted, status.enforcing)Cinco listas com funções diferentes#
A lista de recursos confiáveis permite exports sensíveis do servidor. A whitelist de jogadores protege um jogador. A whitelist de triggers falsos desativa uma armadilha, não autoriza o evento real. ts.ProtectedEvents é o transporte antigo com chave; o padrão inclui test:event. A baseline armazena arquivos revisados para integridade. Uma entrada não altera outras listas. Não copie todos os eventos do framework para ProtectedEvents nem os transforme em armadilhas.
Catálogo completo de exports do servidor#
Os nomes e declarações de argumentos são gerados do inventário real do código servidor deste pacote. É uma referência, não um script para executar em sequência. Preserve maiúsculas e lado servidor/cliente. Inclui diagnóstico, scanners e transporte internos; nome semelhante não significa API de negócio segura. Antes de alterar dados, confira contrato e resultados. Conhecer um nome não concede permissão.
-- tosun-ac / server
-- AddWhitelist(target, durationSec)
-- AllowWeapon(src, weapon, ms)
-- BanPlayerExt(playerId, reason)
-- BypassDetection(playerId, detectionKey, durationMs)
-- ClearArea(playerId, areaName)
-- ForensicLinksOf(license)
-- GetCloudThreatScore(src)
-- GetDetections(playerId, limit)
-- GetIntegrationStatus()
-- GetNearbyPlayers(playerId, radius)
-- GetPlayerInfo(playerId)
-- GetPlayerShieldData(src)
-- GetServerAuthorityStatus()
-- GetStatus()
-- IsExemptFromPunish(src)
-- IsInArea(playerId, areaName)
-- IsMovementExempt(src)
-- IsPlayerProtected(playerId)
-- IsWhitelisted(playerId)
-- KickPlayer(playerId, reason)
-- MarkTeleport(src, ms, reason)
-- NoteCloudViolation(src, reason, punishment)
-- OpenScanCache(sealed)
-- PauseAllDetections(durationMs)
-- PausePlayerDetections(playerId, durationMs)
-- RateLimit(src, key, max, windowMs)
-- RegisterSafeEvent(eventName, validator, handler, options)
-- RemoveWhitelist(target)
-- RequestShieldScreenshot(src)
-- ScanPolicyFingerprint(moduleFile, policy)
-- ScanResourceSnapshot(name, expected, callback)
-- SealScanCache(raw)
-- SetExempt(playerId, durationMs, reason)
-- SetPlayerExempt(playerId, state, durationMs, reason)
-- WhitelistArea(playerId, areaName, durationSec)
-- acV2Challenge(build, license, fp, version)
-- acV2Fingerprint()
-- acV2Integrity(raw)
-- acV2VerifyResponse(raw, build, license, fp, version, nonce, httpCode)
-- addAdmin(playerId)
-- addCheatSignature(pattern, signatureName, severity)
-- addSignatureEscrowSkip(resourceName, note)
-- addSignatureException(resourceName, filePath, signatureName, note)
-- applyTimeWithFramework(h, m)
-- applyWeatherWithFramework(weather)
-- approveResource(resourceName, approvedBy)
-- ban(playerId, reason)
-- batchDetection(playerName, license, steam, discord, ip, dtype, reason, punishment, banID, screenshot, configKey)
-- batchLog(message, playerId, playerName)
-- batchWebhook(url, payload)
-- blockResource(resourceName, reason)
-- centralHandshake()
-- centralPoll()
-- centralStatus()
-- checkIpReputation(ip)
-- cipherHasSession(src)
-- cipherIssueKey(src)
-- cipherVerify(src, payload, signature)
-- clearInventory(src)
-- crashGuardInspect(v)
-- crashGuardReject(src, p)
-- emergencyLockdown(reason)
-- fakeTriggerTrap(eventName, typ)
-- fakeTriggerWhitelist(eventName)
-- freezePlayer(src, freeze)
-- getAdminType(playerId)
-- getBanInfo(banID)
-- getBans(limit, offset)
-- getBaseline()
-- getBatchStats()
-- getCleanupStats()
-- getConfig(configType)
-- getInfectedFiles()
-- getOnlinePlayers()
-- getPlayerLocale(src)
-- getResources()
-- getRuntimeStats()
-- getSourceKey()
-- getStats()
-- getSuspicious()
-- giveWeapon(src, weapon, ammo)
-- healAll()
-- invalidateSignatureCache()
-- isAdmin(playerId)
-- isAdminMenuAllowed(playerId)
-- isPlayerFrozen(src)
-- isPlayerMuted(src)
-- isQuarantined(src)
-- isStaffPlayer(playerId)
-- issueEventKey(src)
-- licenseStatus()
-- lockdownStatus()
-- massFreeze(state)
-- mutePlayer(src, durationSec, reason, actor)
-- offlineBan(data, reason)
-- offlineBanByLicense(...)
-- phoneNotify(targetSrc, title, body, opts)
-- phoneNotifyAdmins(title, body, opts)
-- punish(playerId, reason, image, config, punish)
-- quarantine(src, reason, sec)
-- quarantineList()
-- refreshPanelPermissions()
-- refreshPanelWhitelist()
-- releaseQuarantine(src)
-- reloadSignatureExceptions()
-- reloadSignatureScanCaches()
-- removeAdmin(playerId)
-- removeSignatureEscrowSkip(idOrName)
-- removeSignatureException(id)
-- removeWhitelist(playerId)
-- reportInfection(resource, file, sigs, severity, callback)
-- rescanResources()
-- runCleanup()
-- scanAllResources()
-- scanSingleResource(name)
-- screenCapture(src, requestedBy)
-- setLockdown(state, reason)
-- setPlayerArmor(src, armor)
-- setPlayerHealth(src, hp)
-- setPlayerLocale(src, lang)
-- setSpeedLimit(kmh)
-- slayPlayer(src)
-- spectatePlayer(adminSrc, targetSrc)
-- stripWeapons(src)
-- translate(key, ...)
-- translateForPlayer(src, key, ...)
-- tsAutoSetup()
-- tsBackdoorScanStatus()
-- tsLicenseRecheck()
-- tsScanBackdoors(callback)
-- tsScanEvents()
-- tsSignatureScanStatus()
-- unban(banID)
-- unmutePlayer(src)
-- v6ScreenWatchLatest(serverId)
-- v6ScreenWatchPoll(rid)
-- v6ScreenWatchRequest(serverId, mode, requestedBy, panelUrl, forceBase64)
-- v9StreamHasSession(serverId)
-- warnPlayer(src, reason, actor)
-- webBridgeApplyInventory(src, action, itemName, count, slot)
-- webBridgeApplyMoney(src, moneyType, amount, action)
-- webBridgeFindByCitizen(cid)
-- webBridgeFindByLicense(license)
-- webBridgeGrantAdmin(src)
-- webBridgeRevokeAdmin(src)
-- whitelistPlayer(playerId, duration)
-- tosun-ac-guardian / server
-- guardianAlive()
-- guardianHold(reason,seconds)
-- tosun_render / server
-- GetStatus()Exports cliente e margem local limitada#
SetExempt cliente recebe estado, milissegundos e motivo; servidor recebe source do jogador, milissegundos e motivo. PauseDetections cliente concede a mesma margem limitada de aparência, movimento e câmera, não pausa universal. Chamadas locais compartilham 240 segundos de extensão em dez minutos e até 32 motivos. IsExempt(config) requer a chave exata; IsExempt() considera apenas staff verificado ou isenção/pausa completa confiável. Armas, eventos, injection e verificações desconhecidas permanecem ativos. Trate false sem repetir a cada frame.
-- tosun-ac / client
-- GetExemptions()
-- IsExempt(config)
-- IsPlayerAdmin()
-- NativeGuardThreat()
-- NativeGuardToken()
-- PauseDetections(durationMs)
-- SetExempt(state, durationMs, reason)
-- SetSpawned(state)
-- ShieldCaptureForBan(callback)
-- ShieldFlushBanVideo(callback)
-- TriggerSafeServerEvent(eventName, ...)
-- getConfig()
-- getV12Tolerance(key, default)
-- incNetRequest()
-- incScreenshotEvent()
-- shieldHook(hookType, detailJson)Estado privado e significado dos retornos#
TosunAcState é interno ao recurso AC; outros recursos usam exports documentados. setExempt, setPause e setMovement servidor retornam booleanos e limitam permissões a cinco minutos. Falha de notificação não confirma aumento novo; revogação ou redução permanece registrada mesmo com false. Isenção, pausa e movimento são independentes. setStaff escreve somente espelho de compatibilidade, sem autoridade admin. isExemptFromBag/isPausedFromBag leem permissões privadas verificadas, não bags editáveis. Sucesso não prova entrega a todos os clientes nem pausa de todos os detectores servidor.
-- Internal AC server API; external resources use guarded exports.
-- TosunAcState.setExempt(id, active, ms) -> boolean
-- TosunAcState.setPause(id, ms) -> boolean
-- TosunAcState.setMovement(id, ms) -> boolean
-- TosunAcState.remaining(id, kind) -> remaining milliseconds
-- TosunAcState.setStaff(id, staff) -> compatibility mirror only
-- AddWhitelist(target, durationSec): seconds
-- WhitelistArea(playerId, areaName, durationSec): seconds
-- IsInArea: named record lookup, not a coordinate/permission check
-- WhitelistArea grants broad client relief, not one chosen detector.
-- BypassDetection: detectionKey is ignored; full exemption, <=60000ms
-- Client: IsExempt("ts.antiFreeCam") -> scoped camera grace
-- Client: IsExempt() -> verified staff/full/pause onlyCatálogo de eventos não é autorização#
Este catálogo das fontes lista eventos literais do protocolo AC por lado de registro. Nomes calculados e eventos próprios podem faltar. Não repita manualmente eventos internos de chave, punição, configuração ou menu. Descobrir nome/direção não verifica propriedade ou recompensa. Use RegisterSafeEvent validado para ações sensíveis. Proteção do painel e ac_protected_events alimentam armadilhas/honeypots, não validadores; mantenha EventScanner.autoProtect=false na instalação.
-- tosun-ac/client/AddEventHandler
-- CEventShockingGunshotFired
-- baseevents:onPlayerDied
-- baseevents:onPlayerKilled
-- esx:onPlayerDeath
-- esx_ambulancejob:revive
-- esx_basicneeds:onRevive
-- gameEventTriggered
-- hospital:client:Revive
-- hospital:client:SetDeathState
-- hospital:client:SetLaststand
-- hospital:client:isDead
-- onClientResourceStart
-- onClientResourceStop
-- playerSpawned
-- qb-ambulancejob:client:RevivePlayer
-- qb-medical:client:OnDeath
-- qb-medical:client:OnRevive
-- tosun-ac:nui:pushToolState
-- tosun-ac:uploadTokenUpdated
-- ts_anticheat:adminStateChanged
-- ts_anticheat:adminStatus
-- ts_anticheat:bridge:capture
-- ts_anticheat:bridge:clearInventory
-- ts_anticheat:bridge:freeze
-- ts_anticheat:bridge:giveWeapon
-- ts_anticheat:bridge:heal
-- ts_anticheat:bridge:mute
-- ts_anticheat:bridge:revive
-- ts_anticheat:bridge:setArmor
-- ts_anticheat:bridge:setHealth
-- ts_anticheat:bridge:slay
-- ts_anticheat:bridge:speedLimit
-- ts_anticheat:bridge:stripWeapons
-- ts_anticheat:bridge:teleport
-- ts_anticheat:bridge:time
-- ts_anticheat:bridge:warning
-- ts_anticheat:bridge:weather
-- ts_anticheat:checkTaze
-- ts_anticheat:cipher:assigned
-- ts_anticheat:cipher:request_refresh
-- ts_anticheat:clearDone
-- ts_anticheat:configUpdated
-- ts_anticheat:detectclient
-- ts_anticheat:internal:receiveKey
-- ts_anticheat:internal:trapsChanged
-- ts_anticheat:isAdmin
-- ts_anticheat:joinBundle
-- ts_anticheat:liveSSRequest
-- ts_anticheat:newDetection
-- ts_anticheat:openAdminMenu
-- ts_anticheat:openAdminMenuAuthorized
-- ts_anticheat:panelBroadcast
-- ts_anticheat:panelHeal
-- ts_anticheat:panelRevive
-- ts_anticheat:panelTime
-- ts_anticheat:panelWeather
-- ts_anticheat:promptOpenMenu
-- ts_anticheat:receiveKey
-- ts_anticheat:receiveLiveSS
-- ts_anticheat:receiveLiveVideo
-- ts_anticheat:receivePlayerCount
-- ts_anticheat:receiveScreenshot
-- ts_anticheat:requestCoords
-- ts_anticheat:resourceGuardSync
-- ts_anticheat:shield:requestScreenshot
-- ts_anticheat:shield:uploadConfig
-- ts_anticheat:startVideoLiveStream
-- ts_anticheat:startVideoLiveWeb
-- ts_anticheat:startVideoRecording
-- ts_anticheat:stopVideoLiveStream
-- ts_anticheat:stopVideoLiveWeb
-- ts_anticheat:stopVideoRecording
-- ts_anticheat:syncBanList
-- ts_anticheat:syncConfig
-- ts_anticheat:syncIdentifiers
-- ts_anticheat:syncLogs
-- ts_anticheat:syncPlayers
-- ts_anticheat:takeScreenshot
-- ts_anticheat:unbanDone
-- ts_anticheat:webPanelScreenshot
-- tosun-ac/client/RegisterNUICallback
-- Armour
-- DeleteAll
-- DeleteObjects
-- DeletePeds
-- DeleteVehicles
-- GetPlayerIdentifiers
-- Health
-- addLog
-- armourPlayer
-- banPlayer
-- bringAll
-- bringPlayer
-- cancelAnimation
-- clearNearbyObjects
-- clearNearbyPeds
-- clearNearbyVehicles
-- devtoolsdetected
-- exit
-- freezeAll
-- freezePlayerToggle
-- getBans
-- getLogs
-- getPlayerCount
-- getPlayers
-- giveWeaponPlayer
-- healAll
-- healPlayer
-- isInVehicle
-- kickPlayer
-- liveWatchStart
-- liveWatchStop
-- nuiDependencyMissing
-- nuiWatermark
-- repair
-- returnOCRResult
-- reviveAll
-- revivePlayer
-- screenshotPlayer
-- selfRevive
-- setHealthPlayer
-- setTime
-- setWeather
-- shield_devtools
-- shield_heartbeat
-- shield_heartbeat_fail
-- shield_screenshot
-- shield_tokens
-- shield_video_final
-- shield_video_segment
-- slayPlayer
-- spawnVehicle
-- spectatePlayer
-- stopSpectate
-- stripWeaponsPlayer
-- toggleESP
-- toggleFreecam
-- toggleGodmode
-- toggleInvisible
-- toggleNoclip
-- tosunRenderResult
-- tpToPlayer
-- unbanPlayer
-- verifyModel
-- videoLiveSegmentResult
-- videoRecordingResult
-- videoRecordingStartResult
-- warnPlayerNUI
-- tosun-ac/client/RegisterNetEvent
-- QBCore:Client:OnPlayerLoaded
-- QBCore:Client:OnPlayerUnload
-- esx:onPlayerDeath
-- esx:onPlayerLogout
-- esx:playerLoaded
-- esx_ambulancejob:revive
-- esx_basicneeds:onRevive
-- hospital:client:Revive
-- hospital:client:SetDeathState
-- hospital:client:SetLaststand
-- hospital:client:isDead
-- qb-ambulancejob:client:RevivePlayer
-- qb-medical:client:OnDeath
-- qb-medical:client:OnRevive
-- qbx_core:client:playerLoggedIn
-- qbx_multicharacter:client:chooseChar
-- ts_anticheat:adminStateChanged
-- ts_anticheat:adminStatus
-- ts_anticheat:bridge:capture
-- ts_anticheat:bridge:clearInventory
-- ts_anticheat:bridge:freeze
-- ts_anticheat:bridge:giveWeapon
-- ts_anticheat:bridge:heal
-- ts_anticheat:bridge:mute
-- ts_anticheat:bridge:revive
-- ts_anticheat:bridge:setArmor
-- ts_anticheat:bridge:setHealth
-- ts_anticheat:bridge:slay
-- ts_anticheat:bridge:speedLimit
-- ts_anticheat:bridge:stripWeapons
-- ts_anticheat:bridge:teleport
-- ts_anticheat:bridge:time
-- ts_anticheat:bridge:warning
-- ts_anticheat:bridge:weather
-- ts_anticheat:checkTaze
-- ts_anticheat:cipher:assigned
-- ts_anticheat:cipher:request_refresh
-- ts_anticheat:clearDone
-- ts_anticheat:detectclient
-- ts_anticheat:isAdmin
-- ts_anticheat:joinBundle
-- ts_anticheat:liveSSRequest
-- ts_anticheat:newDetection
-- ts_anticheat:openAdminMenu
-- ts_anticheat:openAdminMenuAuthorized
-- ts_anticheat:panelBroadcast
-- ts_anticheat:panelHeal
-- ts_anticheat:panelRevive
-- ts_anticheat:panelTime
-- ts_anticheat:panelWeather
-- ts_anticheat:promptOpenMenu
-- ts_anticheat:receiveEventKey
-- ts_anticheat:receiveKey
-- ts_anticheat:receiveLiveSS
-- ts_anticheat:receiveLiveVideo
-- ts_anticheat:receivePlayerCount
-- ts_anticheat:receiveScreenshot
-- ts_anticheat:requestCoords
-- ts_anticheat:resourceGuardSync
-- ts_anticheat:shield:requestScreenshot
-- ts_anticheat:shield:uploadConfig
-- ts_anticheat:startVideoLiveStream
-- ts_anticheat:startVideoLiveWeb
-- ts_anticheat:startVideoRecording
-- ts_anticheat:stopVideoLiveStream
-- ts_anticheat:stopVideoLiveWeb
-- ts_anticheat:stopVideoRecording
-- ts_anticheat:syncBanList
-- ts_anticheat:syncConfig
-- ts_anticheat:syncIdentifiers
-- ts_anticheat:syncLogs
-- ts_anticheat:syncPlayers
-- ts_anticheat:takeScreenshot
-- ts_anticheat:unbanDone
-- ts_anticheat:uploadToken
-- ts_anticheat:webPanelScreenshot
-- tosun-ac/server/AddEventHandler
-- QBCore:Server:OnPlayerLoaded
-- QBCore:Server:PlayerLoaded
-- chatMessage
-- clearPedTasksEvent
-- entityControlEvent
-- entityCreated
-- entityCreating
-- esx:playerLoaded
-- eventTriggered
-- explosionEvent
-- fireEvent
-- giveWeaponEvent
-- onResourceStart
-- onResourceStop
-- onServerResourceStart
-- playerConnecting
-- playerDropped
-- playerJoining
-- ptFxEvent
-- qbx_core:server:playerLoaded
-- rconCommand
-- removeAllWeaponsEvent
-- removeWeaponEvent
-- requestControlEvent
-- respawnPlayerPedEvent
-- startProjectileEvent
-- tosun-ac:nuiPermissionRefreshed
-- tosun-ac:panel:characterReady
-- tosun-ac:server:detection
-- tosun-ac:server:logResourceActivity
-- tosun-ac:server:nuiWatermark
-- tosun-ac:server:signedDetection
-- tosun-ac:settingsReloaded
-- ts_anticheat:GetPlayerIdentifiers
-- ts_anticheat:addAdmin_internal
-- ts_anticheat:addLog
-- ts_anticheat:adminDelEntity
-- ts_anticheat:banCommitted
-- ts_anticheat:banPlayer
-- ts_anticheat:banRelay
-- ts_anticheat:bridge:freeze
-- ts_anticheat:bringAllPlayers
-- ts_anticheat:bringPlayer
-- ts_anticheat:cipher:detection
-- ts_anticheat:cipher:request
-- ts_anticheat:clearTasks
-- ts_anticheat:client:scriptsReady
-- ts_anticheat:configUpdated
-- ts_anticheat:deleteObjects
-- ts_anticheat:deletePeds
-- ts_anticheat:deleteVehicles
-- ts_anticheat:freezeAllPlayers
-- ts_anticheat:getBanList
-- ts_anticheat:getLogs
-- ts_anticheat:getPlayerCount
-- ts_anticheat:getPlayers
-- ts_anticheat:healAllPlayers
-- ts_anticheat:internal:pushResourceGuard
-- ts_anticheat:internal:suspicious
-- ts_anticheat:kickPlayer
-- ts_anticheat:liveSSResult
-- ts_anticheat:liveWatchStart
-- ts_anticheat:liveWatchStop
-- ts_anticheat:logAdminMenu
-- ts_anticheat:newLog
-- ts_anticheat:playerBanned
-- ts_anticheat:requestAdminStatus
-- ts_anticheat:requestEventKey
-- ts_anticheat:requestKey
-- ts_anticheat:requestOpenAdminMenu
-- ts_anticheat:returnCoords
-- ts_anticheat:reviveAllPlayers
-- ts_anticheat:screenshotPlayer
-- ts_anticheat:screenshotResult
-- ts_anticheat:server:<computed suffix> [template only; not a runnable exact event]
-- ts_anticheat:server:checkIsAdmin
-- ts_anticheat:server:clientXkzuqBwmTjN7Gab4QzuN9QYZJ1WxxU
-- ts_anticheat:server:requestJoinHandshake
-- ts_anticheat:server:requestResourceGuard
-- ts_anticheat:server:requestSyncData
-- ts_anticheat:server:tazed
-- ts_anticheat:serverClear
-- ts_anticheat:setInvisible
-- ts_anticheat:setTime
-- ts_anticheat:setWeather
-- ts_anticheat:shield:ban_video_saved
-- ts_anticheat:spawnVehicle
-- ts_anticheat:targetArmour
-- ts_anticheat:targetFreeze
-- ts_anticheat:targetGiveWeapon
-- ts_anticheat:targetHeal
-- ts_anticheat:targetRevive
-- ts_anticheat:targetSetHealth
-- ts_anticheat:targetSlay
-- ts_anticheat:targetStripWeapons
-- ts_anticheat:targetWarn
-- ts_anticheat:tpToPlayer
-- ts_anticheat:unbanPlayer
-- ts_anticheat:v10:exec
-- ts_anticheat:v6:detection
-- ts_anticheat:v6:screenshotResult
-- ts_anticheat:verifyModel
-- ts_anticheat:videoResult
-- vehicleComponentControlEvent
-- weaponDamageEvent
-- tosun-ac/server/RegisterNetEvent
-- tosun-ac:panel:characterReady
-- tosun-ac:server:detection
-- tosun-ac:server:logResourceActivity
-- tosun-ac:server:nuiWatermark
-- tosun-guard:acMissing
-- tosun-guard:hello
-- tosun-guard:tick
-- tosun:nativeGuard:status
-- ts_anticheat:GetPlayerIdentifiers
-- ts_anticheat:addLog
-- ts_anticheat:adminDelEntity
-- ts_anticheat:banPlayer
-- ts_anticheat:banRelay
-- ts_anticheat:bridge:freeze
-- ts_anticheat:bringAllPlayers
-- ts_anticheat:bringPlayer
-- ts_anticheat:cipher:detection
-- ts_anticheat:cipher:request
-- ts_anticheat:client:scriptsReady
-- ts_anticheat:deleteObjects
-- ts_anticheat:deletePeds
-- ts_anticheat:deleteVehicles
-- ts_anticheat:freezeAllPlayers
-- ts_anticheat:getBanList
-- ts_anticheat:getLogs
-- ts_anticheat:getPlayerCount
-- ts_anticheat:getPlayers
-- ts_anticheat:healAllPlayers
-- ts_anticheat:kickPlayer
-- ts_anticheat:liveSSResult
-- ts_anticheat:liveWatchStart
-- ts_anticheat:liveWatchStop
-- ts_anticheat:logAdminMenu
-- ts_anticheat:requestAdminStatus
-- ts_anticheat:requestEventKey
-- ts_anticheat:requestKey
-- ts_anticheat:requestOpenAdminMenu
-- ts_anticheat:returnCoords
-- ts_anticheat:reviveAllPlayers
-- ts_anticheat:screenshotPlayer
-- ts_anticheat:screenshotResult
-- ts_anticheat:server:checkIsAdmin
-- ts_anticheat:server:clientXkzuqBwmTjN7Gab4QzuN9QYZJ1WxxU
-- ts_anticheat:server:requestJoinHandshake
-- ts_anticheat:server:requestResourceGuard
-- ts_anticheat:server:requestSyncData
-- ts_anticheat:server:tazed
-- ts_anticheat:serverClear
-- ts_anticheat:setInvisible
-- ts_anticheat:setTime
-- ts_anticheat:setWeather
-- ts_anticheat:shield:banVideo
-- ts_anticheat:shield:heartbeat_fail
-- ts_anticheat:shield:requestUploadConfig
-- ts_anticheat:shield:screenshot
-- ts_anticheat:shield:tokens
-- ts_anticheat:spawnVehicle
-- ts_anticheat:targetArmour
-- ts_anticheat:targetFreeze
-- ts_anticheat:targetGiveWeapon
-- ts_anticheat:targetHeal
-- ts_anticheat:targetRevive
-- ts_anticheat:targetSetHealth
-- ts_anticheat:targetSlay
-- ts_anticheat:targetStripWeapons
-- ts_anticheat:targetWarn
-- ts_anticheat:tpToPlayer
-- ts_anticheat:unbanPlayer
-- ts_anticheat:v10:exec
-- ts_anticheat:v6:detection
-- ts_anticheat:v6:screenshotResult
-- ts_anticheat:verifyModel
-- ts_anticheat:videoResult
-- tosun-ac/server/RegisterServerEvent
-- ts_anticheat:clearTasks
-- tosun-ac/shared/AddEventHandler
-- onClientResourceStart
-- onResourceStop
-- playerDropped
-- ts_anticheat:locale:reload
-- ts_anticheat:locale:setSelf
-- ts_anticheat:locale:sync
-- tosun-ac/shared/RegisterNetEvent
-- ts_anticheat:locale:setSelf
-- ts_anticheat:locale:sync
-- tosun-ac-guardian/server/AddEventHandler
-- onResourceStart
-- onResourceStop
-- tosun_render/server/AddEventHandler
-- onResourceStart
-- tosun-ac/client / RegisterCommand
-- stopspectate
-- tsdelaimed
-- tsfreecam
-- tsmenu
-- unspectate
-- tosun-ac/server / RegisterCommand
-- ac_cleanup
-- acfreeze
-- acping
-- acstats
-- acunfreeze
-- acwarn
-- capture
-- clearinv
-- emergency
-- giveweapon
-- massfreeze
-- mute
-- setarmor
-- sethp
-- speedlimit
-- stripweapons
-- tosunac_backdoorscan
-- tosunac_db_check
-- tosunac_db_status
-- tosunac_doctor
-- tosunac_eventscan
-- tosunac_integration
-- tosunac_license_status
-- tosunac_setup
-- ts
-- ts_adminsync
-- ts_broadcast
-- ts_capture
-- ts_clearinv
-- ts_emergency
-- ts_freeze
-- ts_giveweapon
-- ts_healall
-- ts_kickall
-- ts_lockdown
-- ts_massfreeze
-- ts_modping
-- ts_mute
-- ts_players
-- ts_revive
-- ts_setarmor
-- ts_sethp
-- ts_settime
-- ts_setweather
-- ts_slay
-- ts_speedlimit
-- ts_stripweapons
-- ts_tphere
-- ts_tpto
-- ts_unfreeze
-- ts_unmute
-- ts_v9_help
-- ts_warn
-- ts_warnings
-- unmute
-- tosun-ac/shared / RegisterCommand
-- ts_setlang
-- tosun-ac-guardian/server / RegisterCommand
-- tosunac_guardian_pause
-- tosunac_guardian_resume
-- tosunac_guardian_status
-- tosun_render/server / RegisterCommand
-- tosun_render_statusSafeEvent: reinício, fila e falhas#
RegisterSafeEvent exige nome prefixado pelo recurso, validator e handler. O validator retorna exatamente true após validar o estado atual do servidor. Remova o handler de rede antigo; AC não cancela handlers independentes de outros recursos. Registre novamente após reiniciar seu recurso ou tosun-ac. Estados cliente: sent, queued_until_key, queue_full, invalid_event_or_arguments, resource_stopping. sent é envio, não recibo de recompensa. Fila de até 32 chamadas por 30 segundos. Erro de handler não recebe repetição ou sucesso automático. Use recibo próprio e operação idempotente; não repita dinheiro/itens automaticamente.
-- Client TriggerSafeServerEvent results:
-- true, "sent"
-- false, "queued_until_key"
-- false, "queue_full"
-- false, "invalid_event_or_arguments"
-- false, "resource_stopping"
-- Server RegisterSafeEvent results:
-- true, "registered"
-- false + server_resource_required / use_own_resource_prefix
-- false + invalid_callbacks_or_options / already_registered / registration_capacity
-- Server log may say: application handler failed.
-- No automatic replay; implement an application receipt.Relatório enfileirado não confirma gravação#
reportInfection(resource, file, sigs, severity[, callback]) retorna true só ao enfileirar a operação DB. Callback opcional no máximo uma vez: success, affectedRows; sucesso requer inteiro positivo. Sem resposta do driver não existe garantia de conclusão. Resource 1–190 bytes de letras/dígitos/_.-, file 1–500 bytes, severity 1–50 letras/dígitos/_- (warning padrão). sigs é texto não vazio ou lista densa 1–32 textos, união até255 bytes. NUL/CR/LF são rejeitados. Entrada inválida, driver ausente/rejeição ou erro síncrono: false. Não repita automaticamente resultado incerto.
-- A reviewed server reporting workflow; fictional non-secret labels.
-- resource: 1..190 bytes, letters/digits/underscore/dot/hyphen
-- file: 1..500 bytes; signatures joined: 1..255 bytes
-- severity: 1..50 bytes, letters/digits/underscore/hyphen (no dot)
local queued = exports["tosun-ac"]:reportInfection(
"my-housing", "server.lua", {"reviewed_pattern"}, "warning",
function(success, affectedRows)
print(success and "[scan] report saved" or "[scan] report not confirmed")
end)
-- queued=true is dispatch only; it is not the completion callback.
-- Do not automatically retry an operation with an uncertain outcome.