Jump to content

Korea

Members
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Korea

  1. You are right, however its example code. People have to create own code because cheaters can block addEventHandler / triggerServerEvent and sent fake data. Most of the haxx are using lua injector to create debughook on triggerServerEvent and output info. There is a way to 'bypass' it. addDebugHook("preFunction", function(_, _, _, _, _, ...) triggerServerEvent(...) return "skip" end, {"setPedBleeding"}) -- use function that you wont use on your server setPedBleeding("test123", resourceRoot)
  2. -- example code use your own local screen addEventHandler("onClientRender", root, function() if not screen then return end dxDrawImage(0, 0, 300, 300, screen) end) -- all magic done by calling dxUpdateScreenSource(screen, true) in onClientPreRender local function screenPreRender() if isElement(screen) then destroyElement(screen); screen = nil return end local sx, sy = guiGetScreenSize() screen = dxCreateScreenSource(sx, sy) -- your choice if not isElement(screen) then return end dxUpdateScreenSource(screen, true) removeEventHandler("onClientPreRender", root, screenPreRender) end addEvent("getScreenShot", true) addEventHandler("getScreenShot", resourceRoot, function() addEventHandler("onClientPreRender", root, screenPreRender) end) triggerEvent("getScreenShot", resourceRoot) This is example code. All magic done by screenPreRender function.
  3. local wasReconnected = {} local skipPlayer = {} addEventHandler("onPlayerConnect", root, function(_, _, _, serial) if (wasReconnected[serial] or 0) > getTickCount() then skipPlayer[serial] = true return end skipPlayer[serial] = nil wasReconnected[serial] = nil end) addEventHandler("onPlayerResourceStart", root, function() if skipPlayer[getPlayerSerial(source)] then return end if not wasReconnected[getPlayerSerial(source)] then wasReconnected[getPlayerSerial(source)] = getTickCount() + 10000 redirectPlayer(source, "127.0.0.1", 22003) -- change to your server ip end end) Btw make sure your server require latest mta client version (you can do it via acpanel).
  4. This simple code will protect you from attacking a server by TriggerServerEvent. Also you can use onPlayerTriggerEventThreshold but I think if player turns off internet and do actions then after turning it on all packets will be send in the same interval. Change some settings to your own! -- client side local ServerCalls ServerCalls = { interval = 1000, maxCallsPerInterval = 20, time = 0, calls = 0, refresh = function(self) if self.time < getTickCount() then self.time = getTickCount() + self.interval self.calls = 0 end end, add = function(self) self:refresh(); self.calls = self.calls + 1 end, } ServerCalls.__index = ServerCalls addDebugHook("preFunction", function() ServerCalls:add(); if ServerCalls.calls >= ServerCalls.maxCallsPerInterval and not ServerCalls.makeLastCall then triggerServerEvent("banPlayer", resourceRoot) ServerCalls.makeLastCall = true end return ServerCalls.makeLastCall and "skip" or true end, {"triggerServerEvent"}) -- basic implenemtation of banPlayer (server side) addEvent("banPlayer", true) addEventHandler("banPlayer", resourceRoot, function() banPlayer(client, true, false, true, "Korea", "Anty ddos") end)
  5. This AC is useless if cheater get source code (dumped any of servers you mention).
  6. Hello. I have never used any trainer or smth like that for MTA. I have Cheat Engine on pc I was using it for game like Terraria for godmode, item increase etc. Serial: ABB9660089AD009D4F8B39800BB44803 Reason: Trainer Duration: 31 days
×
×
  • Create New...