Closed Dallefar closed 1 year ago
Tilføje dette til base ind i vrp/vrp
function vRP.honeypot(user_id, amount, reason, webhookText) vRP.ban(user_id, reason) local embedTitle = "Honeypot" local embedDescription = 'ID: ' .. user_id .. ' Forsøgte og spawne ' .. amount .. ' DKK via ' .. GetCurrentResourceName() local webhookData = { username = 'SummerRP - Logs', embeds = { { title = embedTitle, description = embedDescription, color = 16769280 } } } PerformHttpRequest(webhook.HoneyPot, function(err, text, headers) end, 'POST', json.encode(webhookData), { ['Content-Type'] = 'application/json' }) end
Så kan man bruge denne her funtion isted for at skrive alt muligt kode være gang man til lave anticheat til sit script
vRP.honeypot(user_id, amount, reason, webhookText)
Fx.
RegisterServerEvent('delivery:success1') AddEventHandler('delivery:success1', function(amount) local source = source local user_id = vRP.getUserId(source) local money = vRP.getBankMoney(user_id) if amount < 7000 then vRP.giveBankMoney(user_id, amount) TriggerClientEvent("pNotify:SendNotification", source, { text = "Du modtog <b style='color: #4E9350'>" .. amount .. " DKK</b>.", type = "success", timeout = 5000, layout = "centerRight", queue = "global", animation = { open = "gta_effects_fade_in", close = "gta_effects_fade_out" } }) else vRP.honeypot(user_id, amount, "Du forsøgte at spawne ", "Forsøgte at spawne ") end end)
Tilføje dette til base ind i vrp/vrp
Så kan man bruge denne her funtion isted for at skrive alt muligt kode være gang man til lave anticheat til sit script
vRP.honeypot(user_id, amount, reason, webhookText)
Fx.