Advertisement
igromanru

Prevent Autopilot

Jun 29th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. {
  2.   Author: Igromanru
  3.   Description: Activate to prevent beeing autopiloted.
  4. }
  5. [ENABLE]
  6. {$lua}
  7. if syntaxcheck then return end
  8.  
  9. local PLAYER_NO_PTR = "[[BaseA]+10]+11"
  10.  
  11. function randomizePlayerNo()
  12.   local playerNo = math.random(1,255)
  13.   writeBytes(PLAYER_NO_PTR, playerNo)
  14. end
  15.  
  16. randomizePlayerNo()
  17. igroPreventAPTimer = createTimer(getMainForm())
  18. igroPreventAPTimer.Interval = 1000
  19. igroPreventAPTimer.OnTimer = function(timer)
  20.   randomizePlayerNo()
  21. end
  22. igroPreventAPTimer.setEnabled(true)
  23.  
  24. [DISABLE]
  25. {$lua}
  26. if syntaxcheck then return end
  27. if igroPreventAPTimer ~= nil then
  28.   igroPreventAPTimer.setEnabled(false)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement