Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Resource: OURGme v2
- Developers: Split <split.programista@gmail.com>
- You have no right to use this code without my permission.
- (c) 2015 <split.programista@gmail.com>. All rights reserved.
- ]]
- local sx,sy = guiGetScreenSize()
- local px,py = (sx/1920),(sy/1080)
- local data={ showed=nil, button={}, info=nil, misc=nil, }
- local font=dxCreateFont("font.ttf", 20)
- function isMouseIn(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
- local screenW, screenH = guiGetScreenSize()
- function renderZoneBox()
- 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
- dxDrawImage(0*px, 0*py, 1920*px, 1080*py, ":qg-logowanie/wallpaper.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawImage(-9*px, 4*py, 1161*px, 1080*py, ":qg-logowanie/wybor_ec/mapa.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- 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)
- 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)
- if isMouseIn(screenW * 0.2782, screenH * 0.2669, screenW * 0.0307, screenH * 0.0625) then
- 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
- 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)
- 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
- 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)
- else end
- --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)
- --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
- 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)
- else end
- --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
- --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
- 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)
- end
- 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)
- else
- 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
- end
- addEventHandler("onClientClick", root, function(btn,state)
- if btn=="left" and state=="down" then
- if isMouseIn(578*px, 504*py, 51*px, 55*py) and data.showed then -- blueberry
- setElementData(localPlayer,"player:spawn",{314.10, -63.86, 1.58+0.1})
- closeZones()
- end
- 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
- setElementData(localPlayer,"player:spawn",{-1.90, 1211.04, 19.35+0.1})
- closeZones()
- end
- if isMouseIn(986*px, 34*py, 89*px, 85*py) and data.showed then
- local domek=getElementData(localPlayer,"player:house")
- if not domek then
- setElementData(localPlayer,"player:spawn",{314.10, -63.86, 1.58+0.1})
- outputChatBox("* Nie posiadasz domku, lub stracił ważność.")
- end
- closeZones()
- end
- end
- end)
- function closeZones()
- showChat(true)
- showCursor(false)
- fadeCamera(false)
- setElementAlpha(localPlayer,255)
- --setElementData(localPlayer,"player:logged")
- stopSound(data.misc)
- showPlayerHudComponent("radar",false)
- showPlayerHudComponent("crosshair",true)
- showPlayerHudComponent("weapon",false)
- showPlayerHudComponent("radar",true)
- showPlayerHudComponent("health",false)
- showPlayerHudComponent("breath",false)
- --showPlayerHudComponent("tab",false)
- showPlayerHudComponent("clock",false)
- showPlayerHudComponent("ammo",false)
- data.showed=false
- -- Usuwamy elementy
- triggerServerEvent("core:spawnPlayer", localPlayer)
- setTimer(triggerEvent, 250, 1, "gui:start", localPlayer)
- removeEventHandler("onClientRender", root, renderZoneBox)
- end
- function showZones(misc)
- data.misc=misc
- data.showed=true
- showChat(false)
- showPlayerHudComponent("all",false)
- guiSetInputMode("no_binds_when_editing")
- addEventHandler("onClientRender", root, renderZoneBox)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement