Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- #author: chojnas
- #for: QualityGame
- #title: Montaż świateł
- ]]
- local sx, sy = guiGetScreenSize()
- local px,py = (sx/1920), (sy/1080)
- local screenW, screenH = guiGetScreenSize()
- local secondsToFade = 1.5
- local count = 60
- local countingTimer
- font1 = dxCreateFont("font.ttf", 12)
- font12 = dxCreateFont("font.ttf", 10)
- marker = createMarker(1298.21,-1398.95,13.20, "cylinder", 1,255,0,0)
- local ped = createPed(2, 1835.54,-2273.75,13.38)
- createMarker(1835.54,-2273.75,13.38+2,"cylinder", 1, 255,0,0)
- function startCounting12()
- local target = getPedTarget(localPlayer)
- if isElementWithinMarker(localPlayer, marker) then
- if target and getElementsByType(target) == "ped" then
- count = 60
- if count == 60 then
- removeEventHandler("onClientRender", root, gui12)
- addEventHandler('onClientRender', root, czekaj12)
- end
- count = count > 0 and (count - 1) or 0
- if count == 0 then
- if isTimer(countingTimer) then
- killTimer(countingTimer)
- end
- removeEventHandler('onClientRender', root, czekaj12)
- showChat(true)
- end
- end
- end
- end
- function gui12()
- dxDrawText("Aby rozpocząć napad wyjmij broń i wyceluj w sprzedawce", 762*px, 54*py, 1155*px, 123*py, tocolor(255, 255, 255, 255), 1.00, font12, "center", "center", false, false, false, false, false)
- end
- function czekaj12()
- dxDrawText("Rozpocząłeś napad, ukryj się!\nZostały wezwane gliny!\nDo zakończenia napadu pozostało: "..count.."", 762*px, 54*py, 1155*px, 123*py, tocolor(255, 0, 0, 255), 1.00, font12, "center", "center", false, false, false, false, false)
- end
- function isMouseIn ( x, y, width, height )
- if ( not isCursorShowing( ) ) then
- return false
- end
- local sx, sy = guiGetScreenSize ( )
- local cx, cy = getCursorPosition ( )
- local cx, cy = ( cx * sx ), ( cy * sy )
- if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
- return true
- else
- return false
- end
- end
- addEvent("showGUI12", true)
- function pokazGUI12()
- addEventHandler("onClientRender", root, gui12)
- end
- addEventHandler("showGUI12", getRootElement(), pokazGUI12)
- function schowajGUI12()
- removeEventHandler("onClientRender", root, gui12)
- end
- addEvent("hideGUI12", true)
- addEventHandler("hideGUI12", getRootElement(), schowajGUI12)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement