Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- intro_step=math.random(0,850)
- local screenW, screenH = guiGetScreenSize()
- local sx,sy=guiGetScreenSize()
- local data={ showed=nil, button={}, info=nil, misc=nil, }
- local f = dxCreateFont(":west-gui/f/droid-sans.ttf",12)
- 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
- function renderZoneBox()
- dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW * 1.0000, screenH * 1.0000, "bg.png", 0, 0, 0, tocolor(255,255,255,255), false)
- dxDrawRectangle(screenW * 0.3812, screenH * 0.2444, screenW * 0.2383, screenH * 0.5125, tocolor(50,50,50,200), false)
- if not isMouseIn(screenW * 0.4266, screenH * 0.3125, screenW * 0.1469, screenH * 0.0903) then dxDrawRectangle(screenW * 0.4266, screenH * 0.3125, screenW * 0.1469, screenH * 0.0903, tocolor(204,153,0,200), false)
- else dxDrawRectangle(screenW * 0.4266, screenH * 0.3125, screenW * 0.1469, screenH * 0.0903, tocolor(50,50,50,255), false) end
- if not isMouseIn(screenW * 0.4266, screenH * 0.4556, screenW * 0.1469, screenH * 0.0903) then dxDrawRectangle(screenW * 0.4266, screenH * 0.4556, screenW * 0.1469, screenH * 0.0903, tocolor(204,153,0,200), false)
- else dxDrawRectangle(screenW * 0.4266, screenH * 0.4556, screenW * 0.1469, screenH * 0.0903, tocolor(50,50,50,255), false) end
- if not isMouseIn(screenW * 0.4266, screenH * 0.6000, screenW * 0.1469, screenH * 0.0903) then dxDrawRectangle(screenW * 0.4266, screenH * 0.6000, screenW * 0.1469, screenH * 0.0903, tocolor(204,153,0,200), false)
- else dxDrawRectangle(screenW * 0.4266, screenH * 0.6000, screenW * 0.1469, screenH * 0.0903, tocolor(50,50,50,255), false) end
- dxDrawText("Prawo Jazdy San Fierro", screenW * 0.4266, screenH * 0.3097, screenW * 0.5734, screenH * 0.4028, white, 1.00, f, "center", "center", false)
- dxDrawText("Glowny spawn SF", screenW * 0.4266, screenH * 0.4556, screenW * 0.5734, screenH * 0.5486, white, 1.00, f, "center", "center", false)
- dxDrawText("Mieszkanie\nO ile posiadasz!", screenW * 0.4266, screenH * 0.5972, screenW * 0.5734, screenH * 0.6903, white, 1.00, f, "center", "center", false)
- local zone1=math.sin(intro_step/500)*9000
- local zone2=math.cos(intro_step/500)*9000
- intro_step=intro_step-1.5
- end
- addEventHandler("onClientClick", root, function(btn,state)
- if btn=="left" and state=="down" then
- if isMouseIn(screenW * 0.4266, screenH * 0.3125, screenW * 0.1469, screenH * 0.0903) and data.showed then
- setElementData(localPlayer,"player:spawn",{-2156.86, 252.62, 35.32+0.1})
- exports["LS-Notyfikacje"]:noti("Autoryzacja przebiegła pomyślnie!",plr)
- exports["LS-Notyfikacje"]:noti("Wybrałeś: Prawo Jazdy San Fierro",plr)
- closeZones()
- end
- if isMouseIn(screenW * 0.4266, screenH * 0.4556, screenW * 0.1469, screenH * 0.0903) and data.showed then
- setElementData(localPlayer,"player:spawn",{-2649.20, -33.84, 6.13+0.1})
- exports["LS-Notyfikacje"]:noti("Autoryzacja przebiegła pomyślnie!",plr)
- exports["LS-Notyfikacje"]:noti("Wybrałeś: Główny spawn San Fierro",plr)
- closeZones()
- end
- if isMouseIn(screenW * 0.4266, screenH * 0.6000, screenW * 0.1469, screenH * 0.0903) and data.showed then
- local domek=getElementData(localPlayer,"player:house")
- if not domek then
- setElementData(localPlayer,"player:spawn",{-2649.20, -33.84, 6.13+0.1})
- outputChatBox("Nie posiadasz mieszkania, lub stracił ważność, lub nie wykupiony, wytepany na spawna.")
- end
- closeZones()
- end
- end
- end)
- function closeZones()
- showChat(true)
- showCursor(false)
- fadeCamera(false)
- setElementAlpha(localPlayer,255)
- setElementData(localPlayer,"status","Zalogowany(a)")
- stopSound(data.misc)
- showPlayerHudComponent("all",false)
- showPlayerHudComponent("crosshair",true)
- showPlayerHudComponent("weapon",true)
- showPlayerHudComponent("radar",false)
- showPlayerHudComponent("health",true)
- showPlayerHudComponent("breath",true)
- showPlayerHudComponent("clock",true)
- showPlayerHudComponent("ammo",true)
- 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
- showPlayerHudComponent("all",false)
- guiSetInputMode("no_binds_when_editing")
- addEventHandler("onClientRender", root, renderZoneBox)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement