Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2021-02-09, 09:00


!ryzee

rebornMTA






Wiek: 19
Na forum: 2253 dni
Posty: 111
Nick w MP: drakovskyy

Piwa: 55

Respekt: 60

Siemka! Mam problem, po zalogowaniu si? nie widz? radaru, dopiero bo w??czeniu dashboardu pod f5 i wy??czenie go si? pojawia. M?g?by kto? ogarn???


Client:

if getElementData(localPlayer"player:sid"then return end

local root getRootElement()
local resourceRoot getResourceRootElement(getThisResource())
local screenWidthscreenHeight guiGetScreenSize()
local screenW,screenH guiGetScreenSize()


local blurStrength 20

local myScreenSource dxCreateScreenSource(screenWidthscreenHeight)
blurShaderblurTec dxCreateShader("shaders/BlurShader.fx")


function renderblur()
    if blur == true then
        dxUpdateScreenSource(myScreenSource)
        
        dxSetShaderValue(blurShader"ScreenSource"myScreenSource);
        dxSetShaderValue(blurShader"BlurStrength"blurStrength);
        dxSetShaderValue(blurShader"UVSize"screenWidthscreenHeight);

        dxDrawImage(00screenWidthscreenHeightblurShader)
    end
end
addEventHandler("onClientRender"rootrenderblur)

addEventHandler("onClientResourceStop"resourceRoot,
function()
    if blurShader and isElement(blurShaderthen
        destroyElement(blurShader)
        blurShader nil
    end
end)

x,y=2513.581282.80-- my width
intro_step=math.random(0,850)

local sx,sy=guiGetScreenSize()
local data={ showed=nilbutton={}, info=nilmisc=nil, }

function cursorPosition(xywh) 
if (not isCursorShowing()) then 
return false 
end 
local mxmy getCursorPosition() 
local fullxfully guiGetScreenSize() 
cursorxcursory mx*fullxmy*fully 
if cursorx and cursorx and cursory and cursory h then 
return true 
else 
return false 
end 
end 

local dist 100
local angler 0
function getPointFromDistanceRotation(xydistangler)
    local a math.rad(90 angler)
    local dx math.cos(a) * dist;
    local dy math.sin(a) * dist;
    return x+dxy+dy;
end

ALPHA 0

local dxfont00_normal dxCreateFont("normal.ttf"28)
local dxfont0_normal dxCreateFont("normal.ttf"15)
local dxfont1_normal dxCreateFont("normal.ttf"10)
local dxfont2_normal dxCreateFont("normal.ttf"25)
local screenWscreenH guiGetScreenSize()


function renderLoginBox()
        triggerEvent("usunPobieranie"localPlayer)
        dxDrawImage(screenW 0.0000screenH 0.0000screenW 1.0000screenH 1.0000"tlo1.png"000tocolor(225225225255), false)
        --dxDrawImage(screenW 0.4417screenH 0.0381screenW 0.1190screenH 0.1905":ReDsKill_przewodnik/grafy/logo.png"000tocolor(255255255255), true)
        
        if cursorPosition(screenW 0.4453screenH 0.3583screenW 0.1589screenH 0.0352then
       -- dxDrawImage(screenW 0.4453screenH 0.3583screenW 0.1589screenH 0.0352"misc/editbox.png"000tocolor(50,50,50,250), false)
        else
        --dxDrawImage(screenW 0.4453screenH 0.3583screenW 0.1589screenH 0.0352"misc/editbox.png"000tocolor(153153153250), false)
        end
        
        if cursorPosition(screenW 0.4453screenH 0.4028screenW 0.1589screenH 0.0352then
        --dxDrawImage(screenW 0.4453screenH 0.4028screenW 0.1589screenH 0.0352"misc/editbox.png"000tocolor(50,50,50,250), false)
        else
        --dxDrawImage(screenW 0.4453screenH 0.4028screenW 0.1589screenH 0.0352"misc/editbox.png"000tocolor(153153153250), false)
        end
        
        --dxDrawText("Login", (screenW 0.4734) + 1, (screenH 0.6102) + 1, (screenW 0.1370) + 1, (screenH 0.0315) + 1tocolor(000255), 1.00dxfont0_normal"center""center"falsetruetruefalsefalse)
        --dxDrawText("Login"screenW 0.4734screenH 0.6102screenW 0.1370screenH 0.0315tocolor(255255255255), 1.00dxfont0_normal"center""center"falsetruetruefalsefalse)
        --dxDrawText("Haslo", (screenW 0.3363) + 1, (screenH 0.3714) + 1, (screenW 0.3881) + 1, (screenH 0.4210) + 1tocolor(000255), 1.00dxfont0_normal"center""center"falsetruetruefalsefalse)
        --dxDrawText("Haslo"screenW 0.3363screenH 0.3714screenW 0.3881screenH 0.4210tocolor(255255255255), 1.00dxfont0_normal"center""center"falsetruetruefalsefalse)
        --dxDrawText(guiGetText(data.button[1]), (screenW 0.4734) + 1, (screenH 0.6991) + 1, (screenW 0.1370) + 1, (screenH 0.0315) + 1tocolor(30,30,30,250), 1.00dxfont1_normal"left""center"falsefalsetruefalsefalse)
        --dxDrawText(guiGetText(data.button[1]), screenW 0.4458screenH 0.3602screenW 0.6016screenH 0.3917tocolor(255255255255), 1.00dxfont1_normal"left""center"falsefalsetruefalsefalse)
        --dxDrawText(guiGetText(data.button[2]), (screenW 0.4734) + 1, (screenH 0.6102) + 1, (screenW 0.1370) + 1, (screenH 0.0315) + 1tocolor(000255), 1.00dxfont1_normal"left""center"falsefalsetruefalsefalse)
        --dxDrawText(guiGetText(data.button[2]), screenW 0.4458screenH 0.4046screenW 0.6016screenH 0.4361tocolor(255255255255), 1.00dxfont1_normal"left""center"falsefalsetruefalsefalse)
        
        if cursorPosition(screenW 0.2859screenH 0.5769screenW 0.1734screenH 0.0676then
        dxDrawImage(screenW 0.2859screenH 0.5769screenW 0.1734screenH 0.0676"misc/buttons_on.png"000tocolor(255255255255), false)
        else
        dxDrawImage(screenW 0.2859screenH 0.5769screenW 0.1734screenH 0.0676"misc/buttons.png"000tocolor(255255255255), false)
        end

        if cursorPosition(screenW 0.5094screenH 0.5769screenW 0.1734screenH 0.0676then
        dxDrawImage(screenW 0.5094screenH 0.5769screenW 0.1734screenH 0.0676"misc/buttons_on.png"000tocolor(255255255255), false)
        else
        dxDrawImage(screenW 0.5094screenH 0.5769screenW 0.1734screenH 0.0676"misc/buttons.png"000tocolor(255255255255), false)
        end
         dxDrawText("Nazwa uzytkownika"screenW 0.4047screenH 0.2972screenW 0.5958screenH 0.3370tocolor(255255255255), 1.00dxfont0_normal"center""center"falsefalsefalsefalsefalse)
        dxDrawText("Haslo"screenW 0.3995screenH 0.4306screenW 0.5906screenH 0.4704tocolor(255255255255), 1.00dxfont0_normal"center""center"falsefalsefalsefalsefalse)
        --dxDrawText("Zaloguj", (screenW 0.3719) + 1, (screenH 0.6630) + 1, (screenW 0.4745) + 1, (screenH 0.686) + 1tocolor(000255), 1.00dxfont0_normal"center""center"falsefalsetruefalsefalse)
        dxDrawText("Zaloguj"screenW 0.2953screenH 0.5861screenW 0.4474screenH 0.6352tocolor(255255255255), 1.50dxfont0_normal"center""center"falsefalsetruefalsefalse)
        --dxDrawText("Zarejestruj", (screenW 0.3905) + 1, (screenH 0.6143) + 1, (screenW 0.6119) + 1, (screenH 0.6771) + 1tocolor(000255), 1.00dxfont0_normal"center""center"falsefalsetruefalsefalse)
        dxDrawText("Zarejestruj"screenW 0.5203screenH 0.5861screenW 0.6724screenH 0.6352tocolor(255255255255), 1.50dxfont0_normal"center""center"falsefalsefalsefalsefalse)      
end

addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if cursorPosition(screenW 0.2859screenH 0.5769screenW 0.1734screenH 0.0676) and data.showed then 
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) < or string.len(pass) < 2 then
                data.info="Uzupelnij wszystkie pola!"
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
        if cursorPosition(screenW 0.5094screenH 0.5769screenW 0.1734screenH 0.0676) and data.showed then
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) > 25 or string.len(pass) > 25 and string.len(login) < or string.len(pass) < 3 then
                data.info="Login i has?o powinno zawierac od 3 do 15 znakow!"
                return
            end
            triggerServerEvent("logging:newAccount"resourceRootloginpass)
        end
    end
end)

addEvent("logging:result"true)
addEventHandler("logging:result"resourceRoot, function(value,info)
    if not info then info="" end
    if value then
        data.showed=false
        showZones(data.misc)
        
        -- Usuwamy elementy
        destroyElement(data.button[1])
        destroyElement(data.button[2])
        removeEventHandler("onClientRender"rootrenderLoginBox)
    else
        data.info=tostring(info)
        setTimer(function() data.info=nil end30001)
    end
end)

--[[
addEventHandler("onClientResourceStart"resourceRoot, function()
    showChat(false)
    showCursor(true)
    fadeCamera(true)
    data.showed=true
    setElementAlpha(localPlayer,0)
    data.misc=playSound("misc/intro.mp3",true)
    setPlayerHudComponentVisible("radar",true)
    setElementData(localPlayer"notshowhud"false)
    setPlayerHudComponentVisible("radar"true)
    setElementData(localPlayer"showhud"true)
    setSoundVolume(data.misc2.5)
    guiSetInputMode("no_binds_when_editing")
    setElementData(localPlayer,"status","Loguje si?")
    setElementData(localPlayer,"loguje"true)
    addEventHandler("onClientRender"rootrenderLoginBox)
    local nick getPlayerNamelocalPlayer )
    data.button[1] = guiCreateEdit(0.440.360.160.03nicktrue)
    guiSetAlpha(data.button[1], 0.00)
    guiEditSetMaxLength(data.button[1], 15)
    data.button[2] = guiCreateEdit(0.440.410.160.03""true)
    guiEditSetMasked(data.button[2], true)
    guiSetAlpha(data.button[2], 0.00)
    guiEditSetMaxLength(data.button[2], 25)
end)
]]

addEventHandler("onClientResourceStart"resourceRoot, function()
    showChat(false)
    showCursor(true)
    fadeCamera(true)
    data.showed=true
    setElementAlpha(localPlayer,0)
    data.misc=playSound("misc/intro.mp3",true)
    showPlayerHudComponent("radar",false)
    setSoundVolume(data.misc1.0)
    showPlayerHudComponent("all",false)
    guiSetInputMode("no_binds_when_editing")
    setElementData(localPlayer,"status","Loguje si&#65533;")
    --setElementData(localPlayer,"player:logged",false)
    addEventHandler("onClientRender"rootrenderLoginBox)
    local nick getPlayerNamelocalPlayer )
    data.button[1] = guiCreateEdit(0.370.330.260.04nicktrue)
    guiSetAlpha(data.button[1], 0.9)
    data.button[2]=guiCreateEdit(0.370.460.260.04""true)
    guiSetAlpha(data.button[2], 0.9)   
    guiEditSetMasked(data.button[2],true)
end)



Server:

--[[
     Panel Logowania by Kurianusz @2016 . 
     Regulamin /Licencja
     Korzystanie z tego kodu tylko je?eli posiadasz tzwcopyrightsZakaz usuwania tej notatki!
     Pami?taj ?e nielegalne korzystanie z kodu podpada pod kodeks karny :> Tak samo jak usuni?cie tej notatki!
]]


addEvent("logging:checkAccount"true)
addEventHandler("logging:checkAccount"resourceRoot, function(login,pass)

        
    local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE login=?"login)
    local result2=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE register_serial=?"getPlayerSerial(client))
    if not result2 then
        triggerClientEvent(client"logging:result"resourceRootfalse"Nie mozesz utworzyc wiecej niz 2 konta!","blad")
    return end
    if result and #result > 0 then
        if result[1].login == login and result[1].pass == md5(passthen
            local query=exports["pystories-db"]:dbSet("UPDATE pystories_users SET pass=? WHERE login=?",teaEncode(pass,"Trujeczka"),login)
            triggerClientEvent(client"logging:result"resourceRootfalse"Profil zaaktualizowany. Zaloguj sie","git")
            return
        end
        if result[1].login == login and result[1].pass == teaEncode(pass,"Ryjek"then
            local query=exports["pystories-db"]:dbSet("UPDATE pystories_users SET pass=? WHERE login=?",teaEncode(pass,"Trujeczka"),login)
            triggerClientEvent(client"logging:result"resourceRootfalse"Profil zaaktualizowany. Zaloguj sie","git")
            return
        end
        if result[1].login == login and result[1].pass == teaEncode(pass,"Trujeczka"then
            local query=exports["pystories-db"]:dbSet("UPDATE pystories_users SET pass=? WHERE login=?",teaEncode(pass,"*****"),login)
            triggerClientEvent(client"logging:result"resourceRootfalse"Profil zaaktualizowany. Zaloguj sie","git")
            return
        end
        if result[1].login == login and result[1].pass == teaEncode(pass,"*****"then
            for i,player in pairs(getElementsByType("player")) do
                if getElementData(player,"player:sid") == result[1].id then
                triggerClientEvent(client"logging:result"resourceRootfalse"Podany login juz gra!","blad")
                return
            end
            end
            --local result2=exports['pystories-db']:dbGet("SELECT login2 from pystories_users where id=?",result[1].id)
            if not result[1].login2 == false then
            setPlayerName(clientresult[1].login2)
            --outputChatBox("* Zmieniony nick"..result[1].login2..""client255255255)
            else
            setPlayerName(clientlogin)
            end
            setElementData(client"new:sid"result[1].id)
            triggerClientEvent(client"logging:result"resourceRoottrue"Pomyslnie zalogowano!","git")
            triggerEvent("SprawdzDom",root,client)
            if result[1].register_serial == false then
            local query=exports["pystories-db"]:dbSet("UPDATE pystories_users SET register_serial=? WHERE login=?",getPlayerSerial(client),login)
            end
            local logs=exports["pystories-db"]:dbSet("INSERT INTO pystories_logs_login (name,serial,data) VALUES (?,?,NOW())"string.format(login.."("..result[1].id..")"),getPlayerSerial(client))
        else
            triggerClientEvent(client"logging:result"resourceRootfalse"Podajesz zle dane!","blad")
        end
    else
        triggerClientEvent(client"logging:result"resourceRootfalse"Taki login juz istnieje, wymysl inny","blad")
    end
end)
local maks_ilosc_kont -- Maksymalna ilosc kont do rejestracji
addEvent("logging:newAccount"true)
addEventHandler("logging:newAccount"resourceRoot, function(login,pass)
    local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE register_serial=?"getPlayerSerial(client))
    if result and #result >= maks_ilosc_kont then
        triggerClientEvent(client"logging:result"resourceRootfalse"Osiagasz limit kont! (2 konta)","blad")
    return end
    local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE login=?"login)
    if result and #result > 0 then
        triggerClientEvent(client"logging:result"resourceRootfalse"Taki login juz istnieje, wymysl inny","blad")
    else
        local query=exports["pystories-db"]:dbSet("INSERT INTO pystories_users (login,pass,register_serial,changedpw) VALUES (?,?,?,??)"loginteaEncode(pass,"*****"),getPlayerSerial(client),1)
        if query then
            triggerClientEvent(client"logging:result"resourceRootfalse"Rejestracja przebiegla pomyslnie","git")
            setElementData(client"player:logged"true)
        end
    end
end)


W razie problem?w s?u?? pomoc?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-09, 14:14


_jvneczek







Wiek: 22
Na forum: 4325 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5


showZones(data.misc)

pokaz showZones, czyli wyb?r spawnu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-09, 14:28


!ryzee

rebornMTA






Wiek: 19
Na forum: 2253 dni
Posty: 111
Nick w MP: drakovskyy

Piwa: 55

Respekt: 60

if getElementData(localPlayer"player:sid"then return end

x,y=36.63,82.19 -- my width
intro_step=math.random(0,850)

local screenWscreenH guiGetScreenSize()
local sxsy guiGetScreenSize()
local pxpy = (sx/1920),(sy/1080)


local dxfont00_normal dxCreateFont("normal.ttf"28)
local normal16 dxCreateFont("normal.ttf"16)
local normal20 dxCreateFont("normal.ttf"20)

local sx,sy=guiGetScreenSize()
local data={ showed=nilbutton={}, info=nilmisc=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


    local time 3000
    local tick getTickCount()
    local chooseTimes 400
    local chooseBackTimes 400
    local tlo1time 600
    alpha1 interpolateBetween(0,0,0,255,0,0,(getTickCount()-tick)/chooseTimes,"Linear")
    alpha2 interpolateBetween(255,0,0,0,0,0,(getTickCount()-tick)/chooseTimes,"Linear")
    local screenWscreenH guiGetScreenSize()

function renderZoneBox()
    if getElementData(localPlayer"player:sid"then return end
    local ax interpolateBetween(161452540120230,(getTickCount()-tick)/1100"CosineCurve")
    local screenWscreenH guiGetScreenSize()


    dxDrawImage(0*px0*py1920*px1080*py"tlo2.png"000tocolor(255255255alpha), false)
    --dxDrawText("InfinityMTA"screenW 0.3905screenH 0.1000screenW 0.6119screenH 0.4410tocolor(255255255255), 1.00dxfont00_normal"center""center"falsefalsetruefalsefalse)
    --dxDrawImage(426*px0*py1081*px1081*py"map.png"000tocolor(255255255alpha), false)
    --dxDrawText("Lista spawn?w"3347*px54*py193*px66*pytocolor(000alpha), 1.00*pxnormal20"center""center"falsefalsefalsefalsefalse)
    --dxDrawText("Lista spawn?w"3344*px50*py193*px66*pytocolor(255255255alpha), 1.00*pxnormal20"center""center"falsefalsefalsefalsefalse)
    if isMouseIn(screenW 0.4500screenH 0.5269screenW 0.1010screenH 0.0278) or isMouseIn(1117*px192*py35*px48*pythen 
    --dxDrawRectangle(screenW 0.4500screenH 0.5269screenW 0.1010screenH 0.0278tocolor(0216179), false) --start los santos
    --dxDrawImage(1710*px100*py4*px40*py"color.png"000tocolor(200200200alpha))
        else
    --dxDrawRectangle(0*px0*py0*px0*pytocolor(6060600))
    --dxDrawRectangle(screenW 0.4500screenH 0.5269screenW 0.1010screenH 0.0278tocolor(606060255), false)
    end    
    --if isMouseIn(1117*px192*py35*px48*py) or isMouseIn(1710*px100*py140*px40*pythen dxDrawImage(1117*px192*py35*px48*py"map_pointer.png"000tocolor(180,180,180)) else dxDrawImage(1117*px192*py35*px48*py"map_pointer.png"000tocolor(255,255,255,alpha)) end
    
    --dxDrawText("G?owny Spawn"screenW 0.4734screenH 0.5306screenW 0.5281screenH 0.5481tocolor(000alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)
    --dxDrawText("G?owny Spawn"screenW 0.4734screenH 0.5306screenW 0.5281screenH 0.5481tocolor(255255255alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)--koniec los santos
    
    if isMouseIn(screenW 0.4495screenH 0.5639screenW 0.1016screenH 0.0287) or isMouseIn(1725*px170*py125*px40*pythen 
    --dxDrawImage(910*px300*py35*px48*py"map_pointer.png"000tocolor(180,180,180)) --start Blueberry
    --dxDrawRectangle(screenW 0.4495screenH 0.5639screenW 0.1016screenH 0.0287tocolor(0216179), false)
    --dxDrawImage(1725*px170*py4*px40*py"color.png"000tocolor(200200200alpha))
        else
    --dxDrawImage(910*px300*py35*px48*py"map_pointer.png"000tocolor(255,255,255,alpha))
    --dxDrawRectangle(screenW 0.4495screenH 0.5639screenW 0.1016screenH 0.0287tocolor(606060255), false)
    end
    --dxDrawText("Przecho"screenW 0.4734screenH 0.5685screenW 0.5245screenH 0.5870tocolor(000alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)
    --dxDrawText("Przecho"screenW 0.4734screenH 0.5685screenW 0.5245screenH 0.5870tocolor(255255255alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)--koniec Blueberry
    
    --if isMouseIn(screenW 0.4495screenH 0.6019screenW 0.1016screenH 0.0287then dxDrawRectangle(screenW 0.4495screenH 0.6019screenW 0.1016screenH 0.0287tocolor(0216179), false) else dxDrawRectangle(screenW 0.4495screenH 0.6019screenW 0.1016screenH 0.0287tocolor(606060255), falseend --start domy
    --if isMouseIn(1760*px240*py90*px40*pythen dxDrawImage(1760*px240*py4*px40*py"color.png"000tocolor(200200200alpha)) else dxDrawRectangle(0*px0*py0*px0*pytocolor(6060600)) end
    --dxDrawText("Dom"screenW 0.4740screenH 0.6065screenW 0.5260screenH 0.6241tocolor(000alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)
    --dxDrawText("Dom"screenW 0.4740screenH 0.6065screenW 0.5260screenH 0.6241tocolor(255255255alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)--koniec domy
 
    local zone1=math.sin(intro_step/500)*9000
    local zone2=math.cos(intro_step/500)*9000
    setCameraMatrix (967.881735.0121.87zone1zone22)
    intro_step=intro_step-1.5
end

addEventHandler("onClientClick"root, function(btn,state)
    if getElementData(localPlayer"player:sid"then return end
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.0208screenH 0.1611screenW 0.2219screenH 0.1000) or isMouseIn(1117*px192*py35*px48*py) and data.showed then
             setElementData(localPlayer,"player:spawn",{-2678.80, -3.526.13})
             setElementData(localPlayer"p:inv"false)
             closeZones()
        elseif isMouseIn(screenW 0.0182screenH 0.3074screenW 0.2193screenH 0.0972) or isMouseIn(1750*px170*py100*px40*py) and data.showed then
             setElementData(localPlayer,"player:spawn",{-2541.07, -26.7816.42})
             setElementData(localPlayer"p:inv"false)
             closeZones()
        elseif isMouseIn(screenW 0.0182screenH 0.4639screenW 0.2193screenH 0.0972) and data.showed then
        local domek=getElementData(localPlayer,"player:house")
        setElementData(localPlayer"p:inv"false)
        if not domek then
        setElementData(localPlayer,"player:spawn",{-2678.80, -3.526.13})
        setElementData(localPlayer"p:inv"false)
        end
        closeZones()
        end
     end
end)
--[[
addEventHandler("onClientClick"root, function(btn,state)
    if getElementData(localPlayer"player:sid"then return end
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.4500screenH 0.5269screenW 0.1010screenH 0.0278) or isMouseIn(1117*px192*py35*px48*py) and data.showed then
         setElementData(localPlayer,"player:spawn",{946.511733.648.85})
         closeZones()
        end
        if isMouseIn(910*px300*py35*px48*py) or isMouseIn(1750*px170*py100*px40*py) and data.showed then
        setElementData(localPlayer,"player:spawn",{1027.171740.5110.82})
        closeZones()
        end
        if isMouseIn(1760*px240*py90*px40*py) and data.showed then
        local domek=getElementData(localPlayer,"player:house")
        if not domek then
        setElementData(localPlayer,"player:spawn",{-186.321207.5919.67})
        end
        closeZones()
        end
end
end)
]]
function closeZones()
    showChat(true)
    showCursor(false)
    fadeCamera(false)
    setElementAlpha(localPlayer,255)
    setElementData(localPlayer,"status","Zalogowany(a)")
    stopSound(data.misc)
    setPlayerHudComponentVisible("crosshair",false)
    setElementData(localPlayer"player:licznik:tarczowy"true)
    setElementData(localPlayer"notshowhud"false)
    setPlayerHudComponentVisible("radar"false)
    setElementData(localPlayer"showhud"false)
    data.showed=false
    destroyElement(blurShader)
    -- Usuwamy elementy
    setElementData(localPlayer"pokaz:hud"false)
    setElementData(localPlayer'player:sid', (getElementData(localPlayer'new:sid') or 0))
    setElementData(localPlayer'new:sid'false)
    triggerServerEvent("core:spawnPlayer"localPlayer)
    setTimer(triggerEvent2501"gui:start"localPlayer)
    removeEventHandler("onClientRender"rootrenderZoneBox)
    blur false
end

function showZones(misc)
    data.misc=misc
    data.showed=true
     setPlayerHudComponentVisible("all",false)
    setElementData(localPlayer"notshowhud"true)
    guiSetInputMode("no_binds_when_editing")
    addEventHandler("onClientRender"rootrenderZoneBoxend

addCommandHandler("map", function()
setPlayerHudComponentVisible("radar"false)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-09, 15:34


_jvneczek







Wiek: 22
Na forum: 4325 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5


if getElementData(localPlayer"player:sid"then return end





x,y=36.63,82.19 -- my width


intro_step=math.random(0,850)





local screenWscreenH guiGetScreenSize()


local sxsy guiGetScreenSize()


local pxpy = (sx/1920),(sy/1080)








local dxfont00_normal dxCreateFont("normal.ttf"28)


local normal16 dxCreateFont("normal.ttf"16)


local normal20 dxCreateFont("normal.ttf"20)





local sx,sy=guiGetScreenSize()


local data={ showed=nilbutton={}, info=nilmisc=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








    local time 3000


    local tick getTickCount()


    local chooseTimes 400


    local chooseBackTimes 400


    local tlo1time 600


    alpha1 interpolateBetween(0,0,0,255,0,0,(getTickCount()-tick)/chooseTimes,"Linear")


    alpha2 interpolateBetween(255,0,0,0,0,0,(getTickCount()-tick)/chooseTimes,"Linear")


    local screenWscreenH guiGetScreenSize()





function renderZoneBox()


    if getElementData(localPlayer"player:sid"then return end


    local ax interpolateBetween(161452540120230,(getTickCount()-tick)/1100"CosineCurve")


    local screenWscreenH guiGetScreenSize()








    dxDrawImage(0*px0*py1920*px1080*py"tlo2.png"000tocolor(255255255alpha), false)


    --dxDrawText("InfinityMTA"screenW 0.3905screenH 0.1000screenW 0.6119screenH 0.4410tocolor(255255255255), 1.00dxfont00_normal"center""center"falsefalsetruefalsefalse)


    --dxDrawImage(426*px0*py1081*px1081*py"map.png"000tocolor(255255255alpha), false)


    --dxDrawText("Lista spawn?w"3347*px54*py193*px66*pytocolor(000alpha), 1.00*pxnormal20"center""center"falsefalsefalsefalsefalse)


    --dxDrawText("Lista spawn?w"3344*px50*py193*px66*pytocolor(255255255alpha), 1.00*pxnormal20"center""center"falsefalsefalsefalsefalse)


    if isMouseIn(screenW 0.4500screenH 0.5269screenW 0.1010screenH 0.0278) or isMouseIn(1117*px192*py35*px48*pythen 


    --dxDrawRectangle(screenW 0.4500screenH 0.5269screenW 0.1010screenH 0.0278tocolor(0216179), false) --start los santos


    --dxDrawImage(1710*px100*py4*px40*py"color.png"000tocolor(200200200alpha))


        else


    --dxDrawRectangle(0*px0*py0*px0*pytocolor(6060600))


    --dxDrawRectangle(screenW 0.4500screenH 0.5269screenW 0.1010screenH 0.0278tocolor(606060255), false)


    end    


    --if isMouseIn(1117*px192*py35*px48*py) or isMouseIn(1710*px100*py140*px40*pythen dxDrawImage(1117*px192*py35*px48*py"map_pointer.png"000tocolor(180,180,180)) else dxDrawImage(1117*px192*py35*px48*py"map_pointer.png"000tocolor(255,255,255,alpha)) end


    


    --dxDrawText("G?owny Spawn"screenW 0.4734screenH 0.5306screenW 0.5281screenH 0.5481tocolor(000alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)


    --dxDrawText("G?owny Spawn"screenW 0.4734screenH 0.5306screenW 0.5281screenH 0.5481tocolor(255255255alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)--koniec los santos


    


    if isMouseIn(screenW 0.4495screenH 0.5639screenW 0.1016screenH 0.0287) or isMouseIn(1725*px170*py125*px40*pythen 


    --dxDrawImage(910*px300*py35*px48*py"map_pointer.png"000tocolor(180,180,180)) --start Blueberry


    --dxDrawRectangle(screenW 0.4495screenH 0.5639screenW 0.1016screenH 0.0287tocolor(0216179), false)


    --dxDrawImage(1725*px170*py4*px40*py"color.png"000tocolor(200200200alpha))


        else


    --dxDrawImage(910*px300*py35*px48*py"map_pointer.png"000tocolor(255,255,255,alpha))


    --dxDrawRectangle(screenW 0.4495screenH 0.5639screenW 0.1016screenH 0.0287tocolor(606060255), false)


    end


    --dxDrawText("Przecho"screenW 0.4734screenH 0.5685screenW 0.5245screenH 0.5870tocolor(000alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)


    --dxDrawText("Przecho"screenW 0.4734screenH 0.5685screenW 0.5245screenH 0.5870tocolor(255255255alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)--koniec Blueberry


    


    --if isMouseIn(screenW 0.4495screenH 0.6019screenW 0.1016screenH 0.0287then dxDrawRectangle(screenW 0.4495screenH 0.6019screenW 0.1016screenH 0.0287tocolor(0216179), false) else dxDrawRectangle(screenW 0.4495screenH 0.6019screenW 0.1016screenH 0.0287tocolor(606060255), falseend --start domy


    --if isMouseIn(1760*px240*py90*px40*pythen dxDrawImage(1760*px240*py4*px40*py"color.png"000tocolor(200200200alpha)) else dxDrawRectangle(0*px0*py0*px0*pytocolor(6060600)) end


    --dxDrawText("Dom"screenW 0.4740screenH 0.6065screenW 0.5260screenH 0.6241tocolor(000alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)


    --dxDrawText("Dom"screenW 0.4740screenH 0.6065screenW 0.5260screenH 0.6241tocolor(255255255alpha), 1.00*pxnormal16"center""center"falsefalsefalsefalsefalse)--koniec domy


 


    local zone1=math.sin(intro_step/500)*9000


    local zone2=math.cos(intro_step/500)*9000


    setCameraMatrix (967.881735.0121.87zone1zone22)


    intro_step=intro_step-1.5


end





addEventHandler("onClientClick"root, function(btn,state)


    if getElementData(localPlayer"player:sid"then return end


    if btn=="left" and state=="down" then


        if isMouseIn(screenW 0.0208screenH 0.1611screenW 0.2219screenH 0.1000) or isMouseIn(1117*px192*py35*px48*py) and data.showed then


             setElementData(localPlayer,"player:spawn",{-2678.80, -3.526.13})


             setElementData(localPlayer"p:inv"false)


             closeZones()


        elseif isMouseIn(screenW 0.0182screenH 0.3074screenW 0.2193screenH 0.0972) or isMouseIn(1750*px170*py100*px40*py) and data.showed then


             setElementData(localPlayer,"player:spawn",{-2541.07, -26.7816.42})


             setElementData(localPlayer"p:inv"false)


             closeZones()


        elseif isMouseIn(screenW 0.0182screenH 0.4639screenW 0.2193screenH 0.0972) and data.showed then


        local domek=getElementData(localPlayer,"player:house")


        setElementData(localPlayer"p:inv"false)


        if not domek then


        setElementData(localPlayer,"player:spawn",{-2678.80, -3.526.13})


        setElementData(localPlayer"p:inv"false)


        end


        closeZones()


        end


     end


end)


--[[


addEventHandler("onClientClick"root, function(btn,state)


    if getElementData(localPlayer"player:sid"then return end


    if btn=="left" and state=="down" then


        if isMouseIn(screenW 0.4500screenH 0.5269screenW 0.1010screenH 0.0278) or isMouseIn(1117*px192*py35*px48*py) and data.showed then


         setElementData(localPlayer,"player:spawn",{946.511733.648.85})


         closeZones()


        end


        if isMouseIn(910*px300*py35*px48*py) or isMouseIn(1750*px170*py100*px40*py) and data.showed then


        setElementData(localPlayer,"player:spawn",{1027.171740.5110.82})


        closeZones()


        end


        if isMouseIn(1760*px240*py90*px40*py) and data.showed then


        local domek=getElementData(localPlayer,"player:house")


        if not domek then


        setElementData(localPlayer,"player:spawn",{-186.321207.5919.67})


        end


        closeZones()


        end


end


end)


]]


function closeZones()


    showChat(true)


    showCursor(false)


    fadeCamera(false)


    setElementAlpha(localPlayer,255)


    setElementData(localPlayer,"status","Zalogowany(a)")


    stopSound(data.misc)


    setPlayerHudComponentVisible("crosshair",false)


    setElementData(localPlayer"player:licznik:tarczowy"true)


    setElementData(localPlayer"notshowhud"false)


    setPlayerHudComponentVisible("radar"false)


    setElementData(localPlayer"showhud"false)


    data.showed=false


    destroyElement(blurShader)


    -- Usuwamy elementy


    setElementData(localPlayer"pokaz:hud"false)


    setElementData(localPlayer'player:sid', (getElementData(localPlayer'new:sid') or 0))


    setElementData(localPlayer'new:sid'false)


    triggerServerEvent("core:spawnPlayer"localPlayer)


    setTimer(triggerEvent2501"gui:start"localPlayer)


    removeEventHandler("onClientRender"rootrenderZoneBox)


    blur false


end





function showZones(misc)


    data.misc=misc


    data.showed=true


     setPlayerHudComponentVisible("all",false)
     setPlayerHudComponentVisible("radar",true)


    setElementData(localPlayer"notshowhud"true)


    guiSetInputMode("no_binds_when_editing")


    addEventHandler("onClientRender"rootrenderZoneBoxend





addCommandHandler("map", function()


setPlayerHudComponentVisible("radar"false)


end)


Postaw piwo autorowi tego posta
 

 
Tagi: logowanie :: radar
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku