Advertisement
imring

TextDraw Render [ SA:MP ]

Dec 18th, 2017
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. script_name('TextDrawRender')
  2. script_author('imring')
  3.  
  4. scron = false
  5.  
  6. function main()
  7.     while not isSampAvailable() do wait(0) end
  8.     font = renderCreateFont('Verdana', 8, 13)
  9.     sampRegisterChatCommand('rtd', rendTextDraw)
  10.     while true do
  11.         wait(0)
  12.         for textdrawid = 0, 3000 do
  13.             if sampTextdrawIsExists(textdrawid) then
  14.                 local X, Y = sampTextdrawGetPos(textdrawid)
  15.                 posX, posY = convertGameScreenCoordsToWindowScreenCoords(X, Y)
  16.                 if scron then
  17.                     renderFontDrawText(font, textdrawid, posX, posY, 0xFF00FF00)
  18.                 end
  19.             end
  20.         end
  21.     end
  22. end
  23.  
  24. function rendTextDraw()
  25.     if scron then scron = false else scron = true end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement