Advertisement
Guest User

Untitled

a guest
May 25th, 2023
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. require "lib.moonloader"
  2. script_name('Mr.Ghetto')
  3. script_author('Escobar')
  4. local scr = thisScript()
  5. local Active = false
  6. local tag = '{000000} [ Mr. Ghetto ] {FFFFFF}'
  7. function main()
  8. if not isSampLoaded() and not isSampfuncsLoaded then return end
  9. while not isSampAvailable() do wait(0) end
  10. sampRegisterChatCommand('nwh', command)
  11. font = renderCreateFont("Tahoma", 8, 0x4)
  12. sampAddChatMessage(tag..'{363636} Activation: Q - Сбив, X - Нарко, /nwh - Вх нарко, /inv - Передача банданы. {0a0a0a} Author: Escobar')
  13. while true do
  14. wait(0)
  15. if wasKeyPressed(VK_Q)and not sampIsCursorActive()then
  16. sampSendChat("1")
  17. end
  18. if wasKeyPressed(VK_X)and not sampIsCursorActive()then
  19. sampSendChat("/usedrugs 3")
  20. if text:find('У вас нет столько наркотиков!') and act then
  21. end
  22. if text:find('Пока ты в больнице, ты не можешь использовать наркотики!') and act then
  23. end
  24.  
  25. printStringNow('8', 1000)
  26. wait (1000)
  27. printStringNow('7', 1000)
  28. wait (1000)
  29. printStringNow('6', 1000)
  30. wait (1000)
  31. printStringNow('5', 1000)
  32. wait (1000)
  33. printStringNow('4', 1000)
  34. wait (1000)
  35. printStringNow('3', 1000)
  36. wait (1000)
  37. printStringNow('2', 1000)
  38. wait (1000)
  39. printStringNow('1', 1000)
  40. wait (1000)
  41. printStringNow('0', 1000)
  42. end
  43. end
  44. if Active == true then
  45. for i = 0, 1000 do
  46. object = sampGetObjectHandleBySampId(i)
  47. if object > 0 then
  48. modelId = getObjectModel(object)
  49. if modelId == 1575 or modelId == 1576 or modelId == 1577 or modelId == 1578 or modelId == 1579 then
  50. result, positionX, positionY, positionZ = getObjectCoordinates(object)
  51. if result == true and isPointOnScreen(positionX, positionY, positionZ, 0.0) then
  52. posX, posY, posZ = getCharCoordinates(PLAYER_PED)
  53. wposX, wposY = convert3DCoordsToScreen(positionX, positionY, positionZ)
  54. wpos2X, wpos2Y = convert3DCoordsToScreen(posX, posY, posZ)
  55. renderDrawLine(wposX, wposY, wpos2X, wpos2Y, 1, 0x88000000)
  56. renderDrawPolygon(wposX, wposY, 3, 3, 7, 0, 0xba000000)
  57. text = string.format("{0a0a0a}[WH] {ffffff}Закладка")
  58. wposX = wposX + 5
  59. wposY = wposY - 7
  60. renderFontDrawText(font, text, wposX, wposY, 0xcac1f4c1)
  61. end
  62. end
  63. end
  64. end
  65. end
  66. end
  67.  
  68. function command()
  69. Active = not Active
  70. if Active == true then
  71. sampAddChatMessage("{151719}[Narko WH] Активирован!", 0xAAFFFFFF)
  72. else
  73. sampAddChatMessage("{151719}[Narko WH] Деактивирован!", 0xAAFFFFFF)
  74. end
  75. end
  76.  
  77. sampRegisterChatCommand('inv', function()
  78. sampSendChat('/me передал бандану')
  79. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement