Exports
Tüm server-side export'lar exports['tosun-ac']:FonksiyonAdı(...) şeklinde, diğer script'lerinden çağrılır. Aşağıda gruplara göre tüm fonksiyonlar ve kullanım örnekleri var.
1. Whitelist / Muafiyet
Bir oyuncuyu AC ban/kick'lerinden muaf tutar.
-- Süresiz (server restart'ına kadar)
exports['tosun-ac']:AddWhitelist("license:abc123")
-- Geçici (saniye) — server ID veya license/discord/steam
exports['tosun-ac']:AddWhitelist(12, 300) -- 5 dakika
exports['tosun-ac']:RemoveWhitelist(12)
local ok = exports['tosun-ac']:IsWhitelisted(source) -- boolean
2. Bölge / Aktivite bazlı muafiyet
Sadece bir aktivite (parkur, kıyafet dükkanı, görev) süresince muaf tutar.
exports['tosun-ac']:WhitelistArea(source, "parkur", 60) -- 60 sn
exports['tosun-ac']:ClearArea(source, "parkur") -- bitince temizle
local inArea = exports['tosun-ac']:IsInArea(source, "parkur")
3. Tek koruma bazlı bypass
Tüm tespitleri kapatmak yerine yalnız belirli korumayı kısa süre kapatır.
exports['tosun-ac']:BypassDetection(source, "antiTeleport", 5000)
exports['tosun-ac']:BypassDetection(source, { "antiTeleport", "antiNoClip" }, 8000)
Detection key'leri: antiTeleport, antiNoClip, antiFastRun, antiGodMode, antiAimbot, antiSilentAim, antiInvisible, antiSpectate, antiEntitySpawn… (tam liste: panel → AC Ayarları).
4. Genel muafiyet (max 5 dk)
exports['tosun-ac']:SetPlayerExempt(source, true, 30000, "kiyafet")
exports['tosun-ac']:SetPlayerExempt(source, false, 0, "kiyafet")
exports['tosun-ac']:PauseAllDetections(15000) -- TÜM oyunculara (restart/event)
exports['tosun-ac']:PausePlayerDetections(source, 15000) -- tek oyuncu
5. Admin kontrolü
if exports['tosun-ac']:isAdmin(source) then ... end
local t = exports['tosun-ac']:getAdminType(source) -- "tx" | "config" | false
local prot = exports['tosun-ac']:IsPlayerProtected(source) -- admin VEYA whitelist
exports['tosun-ac']:addAdmin(source) -- runtime admin ekle
6. Oyuncu bilgisi
local info = exports['tosun-ac']:GetPlayerInfo(source)
-- { id, name, ping, license, discord, steam, citizenid, isAdmin, coords, endpoint }
local all = exports['tosun-ac']:getOnlinePlayers() -- tüm online özet
local near = exports['tosun-ac']:GetNearbyPlayers(source, 30.0)
7. Ban / tespit kayıtları
local bans = exports['tosun-ac']:getBans(100, 0)
local ban = exports['tosun-ac']:getBanInfo(banID)
local last = exports['tosun-ac']:GetDetections(source, 5)
8. Manuel kick / ban
exports['tosun-ac']:KickPlayer(target, "Sebep")
exports['tosun-ac']:BanPlayerExt(target, "Trolling") -- AC ban pipeline'ı (DB+log)
exports['tosun-ac']:ban(target, "Sebep") -- eski isim
9. Honeypot / sahte tetikleyici
-- Kendi event'inin honeypot'a düşmesini engelle (resmi event)
exports['tosun-ac']:fakeTriggerWhitelist("mybank:deposit")
-- Bir event'i tuzağa çevir (tetikleyen banlanır)
exports['tosun-ac']:fakeTriggerTrap("admin:giveMoney", "server")
10. Durum / Adli
local s = exports['tosun-ac']:GetStatus() -- { version, online, detections, debug, framework }
exports['tosun-ac']:refreshPanelWhitelist()
local alts = exports['tosun-ac']:ForensicLinksOf("abc123") -- alt-hesap/ban-evasion grafiği (v17)
Pratik senaryolar
-- Kıyafet dükkanı
RegisterNetEvent("clothing:start", function() exports['tosun-ac']:SetPlayerExempt(source, true, 60000, "clothing") end)
RegisterNetEvent("clothing:done", function() exports['tosun-ac']:SetPlayerExempt(source, false, 0, "clothing") end)
-- Parkur minigame (sadece teleport+fastrun kapansın)
exports['tosun-ac']:BypassDetection(source, { "antiTeleport","antiFastRun","antiSuperJump" }, 120000)
-- Helikopter teslimat (alan bazlı)
RegisterNetEvent("missions:start", function(id) exports['tosun-ac']:WhitelistArea(source, "mission_"..id, 600) end)
AddWhitelistruntime'dır — restart'ta sıfırlanır. Kalıcı için: panel → AC → Whitelist.durationMsmax 5 dk (SetPlayerExempt / PauseAllDetections / PausePlayerDetections). Daha uzun için WhitelistArea/AddWhitelist (saniye).KickPlayer/BanPlayerExtyalnız güvenilir server script'ten çağrılmalı (client event ile tetiklenmemeli).- Multichar: karakter seçimi sonrası
TriggerServerEvent('tosun-ac:panel:characterReady').
11. Client tarafı event'ler
Bazı muafiyetler istemciden de tetiklenebilir (export'a erişimi olmayan client script'ler için).
-- İstemciden geçici muafiyet talebi (saniye değil ms; max 5 dk)
TriggerServerEvent('ts_anticheat:requestExempt', 15000, "my_minigame")
-- Multichar: karakter seçimi bittiğinde
TriggerServerEvent('tosun-ac:panel:characterReady')
Parametre formatları
idOrLicense:serverId(number) veya string —license:xxx,discord:xxx,steam:xxx,citizeniddurationSec: saniye (Whitelist/Area) ·durationMs: milisaniye, max 300000 (5dk) (Exempt/Pause)detectionKey: tek string veya string array ({ "antiTeleport", "antiNoClip" })
Hızlı referans
| Fonksiyon | İşlev |
|---|---|
AddWhitelist / RemoveWhitelist / IsWhitelisted | Kalıcı/geçici muafiyet |
WhitelistArea / ClearArea / IsInArea | Aktivite bazlı muafiyet |
BypassDetection | Tek korumayı kısa süre kapat |
SetPlayerExempt / PauseAllDetections / PausePlayerDetections | Genel muafiyet (max 5dk) |
isAdmin / getAdminType / IsPlayerProtected / addAdmin | Yetki kontrolü |
GetPlayerInfo / getOnlinePlayers / GetNearbyPlayers | Oyuncu bilgisi |
getBans / getBanInfo / GetDetections | Ban/tespit kayıtları |
KickPlayer / BanPlayerExt / ban | Manuel kick/ban |
fakeTriggerWhitelist / fakeTriggerTrap | Honeypot |
GetStatus / refreshPanelWhitelist / ForensicLinksOf | Durum / adli |
Konsolda hızlı test: exports.tosun-ac:isAdmin(1) · exports.tosun-ac:GetPlayerInfo(1)