Advertisement
Guest User

123

a guest
May 25th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.80 KB | None | 0 0
  1. --[[
  2. Autor: Malentas
  3. ]]
  4.  
  5. local sx, sy = guiGetScreenSize()
  6. local okno1 = false
  7. local ulepszenia = false
  8.  
  9. local pracodawca = createPed(27, 2076.60, -2045.03, 13.59, 180)
  10. setElementData(pracodawca, "name", "Pracodawca")
  11. setElementDimension(pracodawca, 0)
  12. setElementFrozen(pracodawca, true)
  13. local rozpoczecie = createMarker(2076.85, -2047.22, 13.59-.95, "cylinder", 1, 255, 255, 255)
  14. setElementData(rozpoczecie, "praca", true)
  15. setElementDimension(rozpoczecie, 0)
  16.  
  17.  
  18. addEventHandler("onClientMarkerHit", rozpoczecie, function(gracz)
  19. if gracz ~= localPlayer then return end
  20. if getPedOccupiedVehicle(localPlayer) then return end
  21. if getElementData(localPlayer, "punkty") < 25 then exports["np-notyfikacje"]:noti("Nie posiadasz 25 punktów reputacji!", "error") return end
  22. if getElementData(localPlayer, "pracuje") then
  23. if getElementData(localPlayer, "pracuje") ~= "smieciarki" then exports["np-notyfikacje"]:noti("Posiadasz inną aktywną prace!", "error") return end
  24. end
  25. addEventHandler("onClientRender", root, guistart)
  26. okno1 = true
  27. showCursor(true)
  28. triggerServerEvent("pokazTopke:smieciarki:source", localPlayer)
  29. end)
  30.  
  31. local font = dxCreateFont("cz.ttf", 10)
  32. local font2 = dxCreateFont("cz.ttf", 12)
  33.  
  34. local font = dxCreateFont("cz.ttf", 10)
  35. local font2 = dxCreateFont("cz.ttf", 12)
  36.  
  37. local pracownicy = { }
  38.  
  39. local listaulepszen = {
  40. {"Sprint", "Dzięki temu ulepszeniu możesz biegać z koszem", 300, "dolar.png"},
  41. {"Szybsze ładowanie", "Dzięki temu ulepszeniu będziesz szybciej ładował śmieci", 500, "dolar.png"},
  42. {"Zarobek +5%", "Dzięki temu ulepszeniu zarabiasz więcej o 5%", 700, "dolar.png"},
  43. {"Pojemniejsza Śmieciarka", "Dzięki temu ulepszeniu twoja smieciarka zmiesci więcej koszy", 500, "dolar.png"},
  44. }
  45.  
  46.  
  47. function guistart()
  48. dxDrawImage(scale_x(402), scale_y(251), scale_x(637), scale_y(399), ":np-gui/grafiki/tlo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  49. if ulepszenia == false then
  50. local punkty = getElementData(localPlayer, "spunkty") or 0
  51. local zlecenia = getElementData(localPlayer, "szlecenia") or 0
  52. shadowText("Praca zbieracza smieci", scale_x(401), scale_y(251), scale_x(1039), scale_y(295), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  53. --shadowText("Wymagania:\nBRAK", scale_x(401), scale_y(295), scale_x(719), scale_y(449), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  54. shadowText("Wykonane zlecenia: "..zlecenia.."\nPunkty: "..punkty.."", scale_x(402), scale_y(510), scale_x(719), scale_y(646), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  55. shadowText("Top pracownicy:", scale_x(719), scale_y(295), scale_x(1036), scale_y(329), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  56. dxDrawImage(scale_x(415), scale_y(310), scale_x(304), scale_y(175), ":np-magazynier/grafiki/bg2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  57. shadowText("Wymagania: Kategoria C\n25 Punktów reputacji", scale_x(415), scale_y(500), scale_x(719), scale_y(548), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  58. if mysz(scale_x(889), scale_y(592), scale_x(139), scale_y(44)) then
  59. dxDrawImage(scale_x(889), scale_y(592), scale_x(139), scale_y(44), ":np-gui/grafiki/button_on.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  60. else
  61. dxDrawImage(scale_x(889), scale_y(592), scale_x(139), scale_y(44), ":np-gui/grafiki/button_off.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  62. end
  63. if mysz(scale_x(729), scale_y(592), scale_x(139), scale_y(44)) then
  64. dxDrawImage(scale_x(729), scale_y(592), scale_x(139), scale_y(44), ":np-gui/grafiki/button_on.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  65. else
  66. dxDrawImage(scale_x(729), scale_y(592), scale_x(139), scale_y(44), ":np-gui/grafiki/button_off.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  67. end
  68. if getElementData(localPlayer, "pracuje") == "smieciarki" then
  69. shadowText("Zakończ prace", scale_x(728), scale_y(591), scale_x(868), scale_y(636), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  70. else
  71. shadowText("Rozpocznij prace", scale_x(728), scale_y(591), scale_x(868), scale_y(636), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  72. end
  73. shadowText("Ulepszenia", scale_x(888), scale_y(592), scale_x(1028), scale_y(637), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  74. dxDrawImage(scale_x(1010), scale_y(261), scale_x(16), scale_y(16), ":guieditor/images/cross.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  75. shadowText("Nickname:", scale_x(729), scale_y(329), scale_x(880), scale_y(363), tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, false, false, false, false)
  76. shadowText("Wykonane zlecenia:", scale_x(877), scale_y(329), scale_x(1028), scale_y(363), tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, false, false, false, false)
  77.  
  78. for i, v in ipairs(pracownicy) do
  79. local dodatekY = (scale_y(37))*(i-1)
  80. local dodatekY2 = (scale_y(74))*(i-1)
  81.  
  82. dxDrawRectangle(scale_x(729), scale_y(363) + dodatekY, scale_x(299), scale_y(35), tocolor(0, 0, 0, 120), false)
  83. shadowText(v.nick, scale_x(729), scale_y(364) + dodatekY2, scale_x(877), scale_y(398), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  84. shadowText(v.liczba, scale_x(880), scale_y(364) + dodatekY2, scale_x(1028), scale_y(398), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  85. end
  86. else
  87. local punkty = getElementData(localPlayer, "spunkty") or 0
  88. shadowText("Kupno ulepszen", scale_x(401), scale_y(251), scale_x(1039), scale_y(295), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  89. dxDrawImage(scale_x(1011), scale_y(262), scale_x(16), scale_y(16), ":np-gui/grafiki/cofnij.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  90. dxDrawText("Posiadasz: "..punkty.." punktów", scale_x(402), scale_y(582), scale_x(1037), scale_y(648), tocolor(0, 255, 0, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  91. for i, v in ipairs(listaulepszen) do
  92. local dodatekY = (scale_y(72))*(i-1)
  93. local dodatekY2 = (scale_y(144))*(i-1)
  94.  
  95. dxDrawRectangle(scale_x(417), scale_y(297)+dodatekY, scale_x(610), scale_y(70), tocolor(0, 0, 0, 120), false)
  96. dxDrawImage(scale_x(432), scale_y(307)+dodatekY, scale_x(50), scale_y(50), ":np-magazynier/grafiki/"..v[4].."", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  97. shadowText(v[1], scale_x(501), scale_y(297)+dodatekY2, scale_x(874), scale_y(332), tocolor(255, 255, 255, 255), 1.00, font2, "left", "center", false, false, false, false, false)
  98. shadowText(v[2], scale_x(501), scale_y(332)+dodatekY2, scale_x(874), scale_y(367), tocolor(255, 255, 255, 255), 1.00, font, "left", "center", false, false, false, false, false)
  99. if mysz(scale_x(904), scale_y(312)+dodatekY, scale_x(113), scale_y(38)) then
  100. dxDrawImage(scale_x(904), scale_y(312)+dodatekY, scale_x(113), scale_y(38), ":np-gui/grafiki/button_on.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  101. else
  102. dxDrawImage(scale_x(904), scale_y(312)+dodatekY, scale_x(113), scale_y(38), ":np-gui/grafiki/button_off.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  103. end
  104. shadowText("Zakup", scale_x(904), scale_y(312)+dodatekY2, scale_x(1017), scale_y(350), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  105. shadowText("Cena: "..v[3].."p", scale_x(781), scale_y(297)+dodatekY2, scale_x(894), scale_y(335), tocolor(255, 255, 255, 255), 1.00, font2, "center", "center", false, false, false, false, false)
  106. end
  107. end
  108. end
  109.  
  110. addEventHandler("onClientClick", root, function(btn, state)
  111. if btn == "left" and state == "down" then
  112. if mysz(scale_x(729), scale_y(592), scale_x(139), scale_y(44)) and okno1 == true and ulepszenia == false then
  113. if getElementData(localPlayer, "pracuje") == "smieciarki" then
  114. zakonczprace()
  115. else
  116. rozpocznijprace()
  117. end
  118. elseif mysz(scale_x(889), scale_y(592), scale_x(139), scale_y(44)) and okno1 == true and ulepszenia == false then
  119. ulepszenia = true
  120. elseif mysz(scale_x(1010), scale_y(261), scale_x(16), scale_y(16)) and okno1 == true and ulepszenia == false then
  121. removeEventHandler("onClientRender", root, guistart)
  122. okno1 = false
  123. showCursor(false)
  124. elseif mysz(scale_x(1011), scale_y(262), scale_x(16), scale_y(16)) and okno1 == true and ulepszenia == true then
  125. ulepszenia = false
  126. end
  127. for i, v in ipairs(listaulepszen) do
  128. local dodatekY = (scale_y(72))*(i-1)
  129. if mysz(scale_x(904), scale_y(312)+dodatekY, scale_x(113), scale_y(38)) and okno1 == true and ulepszenia == true then
  130. local punkty = getElementData(localPlayer, "spunkty") or 0
  131. if punkty < tonumber(v[3]) then exports["np-notyfikacje"]:noti("Posiadasz za mało punktów by zakupić to ulepszenie", "error") return end
  132. if v[1] == "Szybsze ładowanie" then
  133. if getElementData(localPlayer, "smieciarki:ulepszenie2") == 1 then exports["np-notyfikacje"]:noti("Posiadasz już to ulepszenie", "error") return end
  134. setElementData(localPlayer, "smieciarki:ulepszenie2", 1)
  135. elseif v[1] == "Sprint" then
  136. if getElementData(localPlayer, "smieciarki:ulepszenie1") == 1 then exports["np-notyfikacje"]:noti("Posiadasz już to ulepszenie", "error") return end
  137. setElementData(localPlayer, "smieciarki:ulepszenie1", 1)
  138. elseif v[1] == "Zarobek +5%" then
  139. if getElementData(localPlayer, "smieciarki:ulepszenie3") == 1 then exports["np-notyfikacje"]:noti("Posiadasz już to ulepszenie", "error") return end
  140. setElementData(localPlayer, "smieciarki:ulepszenie3", 1)
  141. elseif v[1] == "Pojemniejsza Śmieciarka" then
  142. if getElementData(localPlayer, "smieciarki:ulepszenie4") == 1 then exports["np-notyfikacje"]:noti("Posiadasz już to ulepszenie", "error") return end
  143. setElementData(localPlayer, "smieciarki:ulepszenie4", 1)
  144. end
  145. exports["np-notyfikacje"]:noti("Zakupujesz ulepszenie: "..v[1])
  146. setElementData(localPlayer, "spunkty", punkty-tonumber(v[3]))
  147. end
  148. end
  149. end
  150. end)
  151.  
  152. addEvent("pokazTopke:smieciarki:client", true)
  153. addEventHandler("pokazTopke:smieciarki:client", root, function(tabelka)
  154. pracownicy = tabelka
  155. end)
  156.  
  157. --praca
  158.  
  159. local kosz = {}
  160. local kmarker = {}
  161. local kblip = {}
  162. local liczbakoszy = 5
  163. local max = 20
  164. local czas = 4000
  165.  
  166. --Jefferson
  167. local miejsce1 = {
  168. {2134.10, -1375.30, 23.98},
  169. {2190.74, -1375.72, 23.99},
  170. {2138.45, -1406.00, 23.99},
  171. {2138.42, -1411.33, 23.99},
  172. {2138.24, -1452.13, 23.98},
  173. }
  174.  
  175. --Ganton
  176. local miejsce2 = {
  177. {2498.26, -1686.70, 13.48},
  178. {2505.73, -1654.07, 13.59},
  179. {2490.30, -1647.08, 14.08},
  180. {2468.72, -1648.26, 13.47},
  181. {2471.70, -1684.67, 13.51},
  182. }
  183.  
  184. --Idlewood
  185. local miejsce3 = {
  186. {2067.43, -1733.55, 13.88},
  187. {2065.64, -1701.91, 14.15},
  188. {2072.29, -1653.71, 13.55},
  189. {2013.18, -1653.42, 13.55},
  190. {2012.33, -1629.07, 13.55},
  191. }
  192.  
  193. --Glen Park
  194. local miejsce4 = {
  195. {1937.65, -1126.89, 25.42},
  196. {1903.61, -1116.77, 25.66},
  197. {1939.73, -1062.33, 24.42},
  198. {2025.53, -1056.79, 24.69},
  199. {1858.05, -1159.61, 23.86},
  200. }
  201.  
  202. --Market
  203. local miejsce5 = {
  204. {1184.90, -1257.63, 15.18},
  205. {1185.32, -1257.91, 18.90},
  206. {1181.94, -1230.21, 18.55},
  207. {1185.18, -1230.07, 22.14},
  208. {1134.85, -1211.10, 18.55},
  209. }
  210.  
  211. --Marina
  212. local miejsce6 = {
  213. {819.46, -1495.79, 13.59},
  214. {867.32, -1509.56, 13.55},
  215. {843.90, -1481.20, 13.60},
  216. {785.13, -1460.96, 13.55},
  217. {811.44, -1553.44, 13.59},
  218. }
  219.  
  220. --Richman
  221. local miejsce7 = {
  222. {298.88, -1335.26, 53.44},
  223. {253.61, -1364.64, 53.11},
  224. {250.39, -1271.32, 73.84},
  225. {254.48, -1219.24, 75.31},
  226. {280.82, -1259.10, 73.92},
  227. }
  228.  
  229. --Las Colinas
  230. local miejsce8 = {
  231. {2528.09, -1036.69, 69.58},
  232. {2501.15, -1062.82, 70.16},
  233. {2488.55, -1013.44, 65.40},
  234. {2629.20, -1071.08, 69.62},
  235. {2556.71, -956.12, 82.73},
  236. }
  237.  
  238. function rozpocznijprace()
  239. if getElementData(localPlayer, "prawko_c") ~= 1 then exports["np-notyfikacje"]:noti("Nie posiadasz prawa jazdy kat. c", "error") return end
  240. setElementData(localPlayer, "pracuje", "smieciarki")
  241. triggerServerEvent("skin:praca", localPlayer, 260)
  242. triggerServerEvent("dajSmieciarke:smieciarki", localPlayer)
  243. removeEventHandler("onClientRender", root, guistart)
  244. okno1 = false
  245. showCursor(false)
  246. stowrzKosze()
  247. wysypisko = createMarker(2080.57, -2000.48, 12.65, "cylinder", 4.5, 0, 255, 0)
  248. bwysypisko = createBlipAttachedTo(wysypisko, 11)
  249. setElementData(localPlayer, "liczbakoszy", 0)
  250. addEventHandler("onClientMarkerHit", wysypisko, function(gracz)
  251. if gracz ~= localPlayer then return end
  252. local ile = getElementData(localPlayer, "liczbakoszy")
  253. if ile <= 1 then exports["np-notyfikacje"]:noti("Aby wyładować smieciarke musisz załadować więcej niż 1 kosz!", "error") return end
  254. local zarobek = 45*ile
  255. if getElementData(localPlayer, "premium") then
  256. zarobek = zarobek+(zarobek*0.2)
  257. end
  258. if getElementData(localPlayer, "smieciarki:ulepszenie3") == 1 then
  259. zarobek = zarobek+(zarobek*0.05)
  260. end
  261. setElementData(localPlayer, "pieniadze", getElementData(localPlayer, "pieniadze")+zarobek)
  262. exports["np-notyfikacje"]:noti("Wyładowałeś smieciarke zarabiasz: "..zarobek.." PLN")
  263. setElementData(localPlayer, "liczbakoszy", 0)
  264. setElementData(getPedOccupiedVehicle(localPlayer), "nametag", "")
  265. end)
  266. end
  267.  
  268. function stowrzKosze()
  269. local los = math.random(1, 8)
  270. if los == 1 then
  271. trasa = miejsce1
  272. elseif los == 2 then
  273. trasa = miejsce2
  274. elseif los == 3 then
  275. trasa = miejsce3
  276. elseif los == 4 then
  277. trasa = miejsce4
  278. elseif los == 5 then
  279. trasa = miejsce5
  280. elseif los == 6 then
  281. trasa = miejsce6
  282. elseif los == 7 then
  283. trasa = miejsce7
  284. elseif los == 8 then
  285. trasa = miejsce8
  286. end
  287. liczbakoszy = 5
  288. for i, v in ipairs(trasa) do
  289. kmarker[i] = createMarker(v[1], v[2], v[3], "corona", 1.2, 0,0,0,0)
  290. kosz[i] = createObject(1339, v[1], v[2], v[3]-0.35)
  291. kblip[i] = createBlipAttachedTo(kosz[i], 41)
  292. setElementData(kmarker[i], "kosz", kosz[i])
  293. setElementData(kmarker[i], "blip", kblip[i])
  294. setElementCollisionsEnabled(kosz[i], false)
  295. addEventHandler("onClientMarkerHit", kmarker[i], function(gracz)
  296. if gracz ~= localPlayer then return end
  297. if getPedOccupiedVehicle(localPlayer) then return end
  298. if getElementData(localPlayer, "kosz") then return end
  299. --destroyElement(getElementData(source, "kosz"))
  300. attachElements(getElementData(source, "kosz"), localPlayer, 0, 0.7, -0.4, 0, 0, 180)
  301. setElementData(localPlayer, "kosz", getElementData(source, "kosz"))
  302. destroyElement(getElementData(source, "blip"))
  303. destroyElement(source)
  304. if getElementData(localPlayer, "smieciarki:ulepszenie1") == 1 then
  305. toggleControl("walk", true)
  306. setControlState(localPlayer, "walk", false)
  307. else
  308. toggleControl("walk", false)
  309. setControlState(localPlayer, "walk", true)
  310. end
  311. setPedWalkingStyle(localPlayer, 66)
  312. end)
  313. end
  314. end
  315.  
  316. addEventHandler("onClientVehicleExit", root, function(gracz, seat)
  317. if gracz ~= localPlayer then return end
  318. if getElementData(localPlayer, "pracuje") == "smieciarki" then
  319. local x,y,z = getElementPosition(source)
  320. pmarker = createMarker(x,y,z, "corona", 1, 0,0,0,0)
  321. setElementData(pmarker, "pojazd", source)
  322. attachElements(pmarker, source, 0.121, -4.047, -0.641)
  323. addEventHandler("onClientMarkerHit", pmarker, function(gracz)
  324. if gracz ~= localPlayer then return end
  325. if getElementData(localPlayer, "kosz") then
  326. local ile = getElementData(localPlayer, "liczbakoszy") or 0
  327. if getElementData(localPlayer, "smieciarki:ulepszenie4") == 1 then
  328. max = 30
  329. else
  330. max = 20
  331. end
  332. if ile == max then exports["np-notyfikacje"]:noti("Twoja Śmieciarka jest już pełna! Jedź ją wyładować.") return end
  333. exports["np-notyfikacje"]:noti("Trwa wypróżnianie kosza...")
  334. setElementFrozen(localPlayer, true)
  335. if getElementData(localPlayer, "smieciarki:ulepszenie1") == 1 then
  336. czas = 2000
  337. else
  338. czas = 4000
  339. end
  340. setTimer(function()
  341. local ile = getElementData(localPlayer, "liczbakoszy") or 0
  342. setElementData(localPlayer, "liczbakoszy", ile+1)
  343. setElementFrozen(localPlayer, false)
  344. exports["np-notyfikacje"]:noti("Kosz został wypróżniony")
  345. destroyElement(getElementData(localPlayer, "kosz"))
  346. local x,y,z = getElementPosition(pmarker)
  347. local rx,ry,rz = getElementRotation(getElementData(pmarker, "pojazd"))
  348. toggleControl("walk", true)
  349. setControlState(localPlayer, "walk", false)
  350. setPedWalkingStyle(localPlayer, 0)
  351. setElementData(localPlayer, "kosz", false)
  352. liczbakoszy = liczbakoszy-1
  353. local pkt = getElementData(localPlayer, "spunkty") or 0
  354. setElementData(localPlayer, "spunkty", pkt+math.random(0, 2))
  355. for i, v in ipairs(getElementsByType("vehicle")) do
  356. if getElementData(v, "kierowca:smieciarki") and getElementData(v, "kierowca:smieciarki") == getElementData(localPlayer, "dbid") then
  357. setElementData(v, "nametag", "Zapełnienie "..getElementData(localPlayer, "liczbakoszy").."/"..max)
  358. end
  359. end
  360. if liczbakoszy == 0 then
  361. stowrzKosze()
  362. triggerServerEvent("daj:szlecenia", localPlayer, localPlayer)
  363. end
  364. end, czas, 1)
  365. end
  366. end)
  367. end
  368. end)
  369.  
  370. addEventHandler("onClientVehicleEnter", root, function(gracz, seat)
  371. if gracz ~= localPlayer then return end
  372. if getElementData(localPlayer, "pracuje") == "smieciarki" then
  373. if isElement(pmarker) then
  374. destroyElement(pmarker)
  375. end
  376. end
  377. end)
  378.  
  379.  
  380. function zakonczprace()
  381. setElementData(localPlayer, "pracuje", false)
  382. triggerServerEvent("skin:praca", localPlayer, getElementData(localPlayer, "skin"))
  383. triggerServerEvent("usunSmieciarke:smieciarki", localPlayer)
  384. setElementData(localPlayer, "liczbakoszy", 0)
  385. for i, v in ipairs(kmarker) do
  386. if isElement(v) then
  387. destroyElement(v)
  388. end
  389. end
  390. for i, v in ipairs(kblip) do
  391. if isElement(v) then
  392. destroyElement(v)
  393. end
  394. end
  395. for i, v in ipairs(kosz) do
  396. if isElement(v) then
  397. destroyElement(v)
  398. end
  399. end
  400. if isElement(pmarker) then
  401. destroyElement(pmarker)
  402. end
  403. if isElement(wysypisko) then
  404. destroyElement(wysypisko)
  405. end
  406. if isElement(bwysypisko) then
  407. destroyElement(bwysypisko)
  408. end
  409. end
  410.  
  411.  
  412. --opcje
  413.  
  414. function shadowText(text,x,y,w,h,color,size,font,xx,yy,x1,x2,x3,x4,x5)
  415. dxDrawText(text,x+1,y+1,w+1,h+1,tocolor(0,0,0),size,font,xx,yy,x1,x2,x3,x4,x5)
  416. dxDrawText(text,x,y,w,h,color,size,font,xx,yy,x1,x2,x3,x4,x5)
  417. end
  418.  
  419. function mysz(psx,psy,pssx,pssy,abx,aby)
  420. if not isCursorShowing() then return end
  421. cx,cy=getCursorPosition()
  422. cx,cy=cx*sx,cy*sy
  423. if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
  424. return true,cx,cy
  425. else
  426. return false
  427. end
  428. end
  429.  
  430. function scale_x(value)
  431. local result = (value / 1440) * sx
  432.  
  433. return result
  434. end
  435.  
  436. function scale_y(value)
  437. local result = (value / 900) * sy
  438.  
  439. return result
  440. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement