x,y=36.63,82.19 -- my width intro_step=math.random(0,850) local sx,sy=guiGetScreenSize() local data={ showed=nil, button={}, info=nil, misc=nil, } 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 CityPhoto = "noselect" local screenW, screenH = guiGetScreenSize() local w, h = (screenW/1280), (screenH/1024) function renderZoneBox() dxDrawImage(872*w, 101*h, 389*w, 400*h, "images/"..CityPhoto..".png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(0*w, 0*h, 1280*w, 1024*h, "images/mapSCREEN.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) if isMouseIn(164*w, 443*h, 33*w, 43*h) then CityPhoto = "doherty" elseif isMouseIn(82*w, 411*h, 33*w, 43*h) then CityPhoto = "urzad" elseif isMouseIn(672*w, 351*h, 33*w, 43*h) then CityPhoto = "ls" elseif isMouseIn(73*w, 875*h, 204*w, 64*h) then CityPhoto = "house" end local zone1=math.sin(intro_step/500)*9000 local zone2=math.cos(intro_step/500)*9000 setCameraMatrix (-2092.142578125, 137.322265625, 68.282814025879, zone1, zone2, 2) intro_step=intro_step-1.5 end addEventHandler("onClientClick", root, function(btn,state) if btn=="left" and state=="down" then -- urzad if isMouseIn(82*w, 411*h, 33*w, 43*h) and data.showed then setElementData(localPlayer,"player:spawn",{-2756.67505, 376.32254, 4.3359+0.1}) closeZones() end -- Los Santos if isMouseIn(672*w, 351*h,33*w, 43*h) and data.showed then setElementData(localPlayer,"player:spawn",{1479.75793, -1709.16248, 14.04688+0.1}) closeZones() end -- DOM if isMouseIn(73*w, 875*h, 204*w, 64*h) and data.showed then local domek=getElementData(localPlayer,"player:house") if not domek then setElementData(localPlayer,"player:spawn",{-1969.36462, 137.87120, 27.68750+0.1}) outputChatBox("Nie posiadasz domku!") end closeZones() end end end) function closeZones() showChat(true) showCursor(false) fadeCamera(false) setElementAlpha(localPlayer,255) stopSound(data.misc) showPlayerHudComponent("all",false) showPlayerHudComponent("radar",true) showPlayerHudComponent("crosshair",true) showPlayerHudComponent("weapon",false) showPlayerHudComponent("health",false) showPlayerHudComponent("breath",false) showPlayerHudComponent("ammo",true) data.showed=false destroyElement(blurShader) -- Usuwamy elementy triggerServerEvent("core:spawnPlayer", localPlayer) setTimer(triggerEvent, 250, 1, "gui:start", localPlayer) removeEventHandler("onClientRender", root, renderZoneBox) blur = false end function showZones(misc) data.misc=misc data.showed=true showPlayerHudComponent("all",false) guiSetInputMode("no_binds_when_editing") addEventHandler("onClientRender", root, renderZoneBox) end