Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.64 KB | None | 0 0
  1. --[[
  2. Resource: OURGme v2
  3. Developers: Split <split.programista@gmail.com>
  4. You have no right to use this code without my permission.
  5. (c) 2015 <split.programista@gmail.com>. All rights reserved.
  6. ]]
  7.  
  8. local sx,sy = guiGetScreenSize()
  9. local px,py = (sx/1920),(sy/1080)
  10. local data={ showed=nil, button={}, info=nil, misc=nil, }
  11. local font=dxCreateFont("font.ttf", 20)
  12.  
  13. function isMouseIn(psx,psy,pssx,pssy,abx,aby)
  14. if not isCursorShowing() then return end
  15. cx,cy=getCursorPosition()
  16. cx,cy=cx*sx,cy*sy
  17. if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
  18. return true,cx,cy
  19. else
  20. return false
  21. end
  22. end
  23. local screenW, screenH = guiGetScreenSize()
  24.  
  25. function renderZoneBox()
  26. if data.info then dxDrawText(data.info, sx*252/1024, sy*232/768, sx*800/1024, sy*255/768, tocolor(255, 0, 0, 255), 1.00, "default", "center", "center", false) end
  27. dxDrawImage(0*px, 0*py, 1920*px, 1080*py, ":qg-logowanie/wallpaper.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  28. dxDrawImage(-9*px, 4*py, 1161*px, 1080*py, ":qg-logowanie/wybor_ec/mapa.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  29. dxDrawImage(1152*px, 69*py, 748*px, 188*py, ":qg-logowanie/wybor_ec/witaj_w.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  30. dxDrawImage(screenW * 0.2782, screenH * 0.2669, screenW * 0.0307, screenH * 0.0625, ":qg-logowanie/wybor_ec/lokalizacja.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  31. if isMouseIn(screenW * 0.2167, screenH * 0.3021, screenW * 0.0791, screenH * 0.0456) then
  32. dxDrawImage(screenW * 0.2167, screenH * 0.3021, screenW * 0.0791, screenH * 0.0456, ":qg-logowanie/wybor_ec/pc.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end
  33. if not isMouseIn(560*px, 491*py, 74*px, 73*py) then dxDrawImage(568*px, 494*py, 68*px, 82*py, ":qg-logowanie/wybor_ec/lokalizacja.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  34. else dxDrawImage(568*px, 494*py, 68*px, 82*py, ":qg-logowanie/wybor_ec/lokalizacja.png", 0, 0, 0, tocolor(255, 255, 255, 195), false) end
  35. if isMouseIn(560*px, 491*py, 74*px, 73*py) then dxDrawImage(373*px, 506*py, 182*px, 61*py, ":qg-logowanie/wybor_ec/bb.png", 0, 0, 0, tocolor(255, 255, 255, 195), false)
  36. else end
  37. --if isMouseIn(717*px, 751*py, 75*px, 82*py) then dxDrawImage(724*px, 751*py, 68*px, 82*py, ":qg-logowanie/wybor_ec/lokalizacja.png", 0, 0, 0, tocolor(255, 255, 255, 195), false)
  38. --else dxDrawImage(724*px, 751*py, 68*px, 82*py, ":qg-logowanie/wybor_ec/lokalizacja.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end
  39. if isMouseIn(717*px, 751*py, 75*px, 82*py) then dxDrawImage(798*px, 773*py, 182*px, 61*py, ":qg-logowanie/wybor_ec/sf.png", 0, 0, 0, tocolor(255, 255, 255, 195), false)
  40. else end
  41.  
  42. --if isMouseIn(938*px, 490*py, 75*px, 82*py) then dxDrawImage(945*px, 490*py, 68*px, 82*py, ":qg-logowanie/wybor_ec/lokalizacja.png", 0, 0, 0, tocolor(255, 255, 255, 195), false) else
  43. --dxDrawImage(945*px, 490*py, 68*px, 82*py, ":qg-logowanie/wybor_ec/lokalizacja.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end
  44.  
  45. if isMouseIn(938*px, 490*py, 75*px, 82*py) then dxDrawImage(764*px, 491*py, 182*px, 61*py, ":qg-logowanie/wybor_ec/pc.png", 0, 0, 0, tocolor(255, 255, 255, 195), false)
  46. end
  47. if isMouseIn(986*px, 34*py, 89*px, 85*py) then dxDrawImage(989*px, 35*py, 86*px, 84*py, ":qg-logowanie/wybor_ec/dom.png", 0, 0, 0, tocolor(255, 255, 255, 195), false)
  48. else
  49. dxDrawImage(989*px, 35*py, 86*px, 84*py, ":qg-logowanie/wybor_ec/dom.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end
  50.  
  51. end
  52.  
  53.  
  54.  
  55. addEventHandler("onClientClick", root, function(btn,state)
  56. if btn=="left" and state=="down" then
  57. if isMouseIn(578*px, 504*py, 51*px, 55*py) and data.showed then -- blueberry
  58. setElementData(localPlayer,"player:spawn",{314.10, -63.86, 1.58+0.1})
  59. closeZones()
  60. end
  61. if isMouseIn(screenW * 0.2782, screenH * 0.2669, screenW * 0.0307, screenH * 0.0625) and data.showed then -- FC TU KURWA USTAW MIEJSCE SPAWNU FC
  62. setElementData(localPlayer,"player:spawn",{-1.90, 1211.04, 19.35+0.1})
  63. closeZones()
  64. end
  65. if isMouseIn(986*px, 34*py, 89*px, 85*py) and data.showed then
  66. local domek=getElementData(localPlayer,"player:house")
  67. if not domek then
  68. setElementData(localPlayer,"player:spawn",{314.10, -63.86, 1.58+0.1})
  69. outputChatBox("* Nie posiadasz domku, lub stracił ważność.")
  70. end
  71. closeZones()
  72. end
  73. end
  74. end)
  75.  
  76. function closeZones()
  77. showChat(true)
  78. showCursor(false)
  79. fadeCamera(false)
  80. setElementAlpha(localPlayer,255)
  81. --setElementData(localPlayer,"player:logged")
  82. stopSound(data.misc)
  83. showPlayerHudComponent("radar",false)
  84. showPlayerHudComponent("crosshair",true)
  85. showPlayerHudComponent("weapon",false)
  86. showPlayerHudComponent("radar",true)
  87. showPlayerHudComponent("health",false)
  88. showPlayerHudComponent("breath",false)
  89. --showPlayerHudComponent("tab",false)
  90. showPlayerHudComponent("clock",false)
  91. showPlayerHudComponent("ammo",false)
  92. data.showed=false
  93. -- Usuwamy elementy
  94. triggerServerEvent("core:spawnPlayer", localPlayer)
  95. setTimer(triggerEvent, 250, 1, "gui:start", localPlayer)
  96. removeEventHandler("onClientRender", root, renderZoneBox)
  97. end
  98.  
  99. function showZones(misc)
  100. data.misc=misc
  101. data.showed=true
  102. showChat(false)
  103. showPlayerHudComponent("all",false)
  104. guiSetInputMode("no_binds_when_editing")
  105. addEventHandler("onClientRender", root, renderZoneBox)
  106. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement