Advertisement
imring

Time in game [ SA:MP ]

Dec 23rd, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. -- Video: https://www.youtube.com/watch?v=27TYjWk8FCw&feature=youtu.be
  2.  
  3. sec = 0
  4. tim = false
  5.  
  6. function main()
  7.     while not isSampAvailable() do wait(0) end
  8.     font = renderCreateFont('Verdana', 8, 13)
  9.     while true do wait(0)
  10.         renderFontDrawText(font, tostring(sec), 50, 350, -1)
  11.         if not tim then
  12.             lua_thread.create(Timer)
  13.             tim = true
  14.         end
  15.     end
  16. end
  17.  
  18. function Timer()
  19.     while true do wait(1000)
  20.         sec = sec + 1
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement