Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Autor: DylemaT929 <dylemat9292@gmail.com>
- Zakaz usuwania autora. Nie masz prawa u�ywa� skryptu bez mojej zgody!
- (c) 2017 <dylemat9292@gmail.com>. Wszelkie prawa zastrze�one
- ]]
- local screenW, screenH = guiGetScreenSize()
- local sx, sy = guiGetScreenSize()
- local pieniadze = 0
- local font = dxCreateFont(":pseudol-nametagi/f/droid-sans.ttf", 12)
- function kursorek(psx,psy,pssx,pssy,abx,aby)
- if not isCursorShowing() then return end
- cx,cy=getCursorPosition()
- cx,cy=cx*sx,cy*sy
- if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
- return true,cx,cy
- else
- return false
- end
- end
- function roundedRectangle(x, y, w, h, color)
- dxDrawRectangle(x, y, w, h, color, false)
- dxDrawRectangle(x + 2, y - 1, w - 4, 1, color, false)
- dxDrawRectangle(x + 2, y + h, w - 4, 1, color, false)
- dxDrawRectangle(x - 1, y + 2, 1, h - 4, color, false)
- dxDrawRectangle(x + w, y + 2, 1, h - 4, color, false)
- end
- local pasek = guiCreateEdit(0.46, 0.53, 0.18, 0.04, "", true)
- guiSetVisible(pasek, false)
- function pokazBankomat()
- dxDrawImage(screenW * 0.2500, screenH * 0.2000, screenW * 0.6031, screenH * 0.6639, ":qg-bankomaty/bankomaty.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawImage(screenW * 0.5050, screenH * 0.6200, screenW * 0.0938, screenH * 0.0454, ":qg-bankomaty/zamknij.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawImage(screenW * 0.3900, screenH * 0.6200, screenW * 0.0938, screenH * 0.0454, ":qg-bankomaty/wyplac.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawImage(screenW * 0.6200, screenH * 0.6200, screenW * 0.0938, screenH * 0.0454, ":qg-bankomaty/wplac.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawText("SALDO KONTA:\n"..pieniadze.." PLN", screenW * 0.1400, screenH * 0.4700, screenW * 0.9641, screenH * 0.4991, tocolor(255, 255, 255, 255), 1, font, "center", "center", false, false, false, false, false)
- end
- addEventHandler("onClientClick", root, function(btn, state)
- if btn == "left" and state == "down" and guiGetVisible(pasek) == true then
- local txt = guiGetText(pasek)
- if kursorek(screenW * 0.6200, screenH * 0.6200, screenW * 0.0938, screenH * 0.0454) and guiGetVisible(pasek) then
- triggerServerEvent("bank:dodaj", localPlayer, txt)
- local snd=playSound("hajs.mp3")
- guiSetVisible(pasek, false)
- removeEventHandler("onClientRender", root, pokazBankomat)
- showCursor(false)
- elseif kursorek(screenW * 0.3900, screenH * 0.6200, screenW * 0.0938, screenH * 0.0454) and guiGetVisible(pasek) then
- triggerServerEvent("bank:oddaj", localPlayer, txt)
- local snd=playSound("hajs.mp3")
- guiSetVisible(pasek, false)
- removeEventHandler("onClientRender", root, pokazBankomat)
- showCursor(false)
- elseif kursorek(screenW * 0.5050, screenH * 0.6200, screenW * 0.0938, screenH * 0.0454) and guiGetVisible(pasek) then
- guiSetVisible(pasek, false)
- removeEventHandler("onClientRender", root, pokazBankomat)
- showCursor(false)
- end
- end
- end)
- addEvent("stworz:bankOkno", true)
- addEventHandler("stworz:bankOkno", root, function()
- guiSetText(pasek, "")
- guiSetVisible(pasek, true)
- guiSetInputMode("no_binds_when_editing")
- addEventHandler("onClientRender", root, pokazBankomat)
- showCursor(true)
- end)
- addEvent("wczytaj:bankOkno", true)
- addEventHandler("wczytaj:bankOkno", root, function(money)
- pieniadze = money
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement