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

Wysłany: 2019-08-10, 00:33


koko7864

PSEUDO SKRYPTER






Wiek: 22
Na forum: 3230 dni
Posty: 41
Nick w MP: Mar0x

Piwa: 1

Respekt: 50

Witam chce si? zalogowa? ale nie ma nigdzie linijki do wpisania loginu i hasla
dam pare kod?w bo nw jaki do tego s?u?y
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 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 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

local tick getTickCount();

function renderLoginBox()
    local h,h2,h3 interpolateBetween(screenW * -0.5screenW * -0.3screenW * -0.25screenW 0screenH 0.4361screenH 0.5824, (getTickCount()-tick)/1500"OutBack");
    exports.editbox:editboxSetPosition("LOGIN"screenW 0.4255h2);
    exports.editbox:editboxSetPosition("HASLO"screenW 0.4255h3); 

    dxDrawImage(screenW 0.0000screenW 0screenW 1.0000screenH 1.0000"img/bg.png"000tocolor(255255255255), false)
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"img/logowanie.png"000tocolor(255255255255), false)
    
    --dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"zalogujon.png"000tocolor(255255255255), false)
    
    
    if isMouseIn(screenW 0.2380screenH 0.4519screenW 0.1016screenH 0.1648then
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"img/zalogujon.png"000tocolor(255255255255), false)
    else
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"img/zalogujoff.png"000tocolor(255255255255), false)
    end
    
    if isMouseIn(screenW 0.6823screenH 0.4519screenW 0.1016screenH 0.1648then
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"img/zarejestrujon.png"000tocolor(255255255255), false)
    else
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"img/zarejestrujoff.png"000tocolor(255255255255), false)
    end

    if data.info then dxDrawText(data.infoscreenW 0.4057screenH 0.5056screenW 0.6396screenH 0.5435tocolor(25500255), 1.00"default-bold""center""center"falseend

    dxDrawRectangle(screenW 0.4255screenH 0.3676screenW 0.1714screenH 0.0472tocolor(255,255,2550), false)
    dxDrawRectangle(screenW 0.4255screenH 0.5056screenW 0.1714screenH 0.0472tocolor(255,255,2550), false)

    local fft getSoundFFTData(data.misc20482);
    dxDrawImage(00screenWscreenH"img/paski.png"000tocolor(255255255fft[1]*256), false);
end




addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.2380screenH 0.4519screenW 0.1016screenH 0.1648) and data.showed then
            local login=exports.editbox:editboxGetText("LOGIN");
            local pass=exports.editbox:editboxGetText("HASLO");
            if string.len(login) < or string.len(pass) < 2 then
                data.info="Nale?y wype?ni? wszystkie pola."
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
        if isMouseIn(screenW 0.6823screenH 0.4519screenW 0.1016screenH 0.1648) and data.showed then
            local login=exports.editbox:editboxGetText("LOGIN");
            local pass=exports.editbox:editboxGetText("HASLO");
            if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < or string.len(pass) < 3 then
                data.info="Login i has?o powinno zawiera? od 3 do 22 znak?w."
                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)
        
        exports.editbox:destroyEditbox("LOGIN")
        exports.editbox:destroyEditbox("HASLO")
        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)
    showPlayerHudComponent("radar",false)
    setSoundVolume(data.misc1.0)
    showPlayerHudComponent("all",false)
    guiSetInputMode("no_binds_when_editing")
    setElementData(localPlayer,"status","Loguje si?")
    addEventHandler("onClientRender"rootrenderLoginBox)

    exports.editbox:createEditbox("LOGIN","Wprowad? nick...",screenW 0.4255screenH 0.4361screenW 0.2080screenH 0.0407)
    exports.editbox:createEditbox("HASLO","Wprowad? has?o...",screenW 0.4255screenH 0.5824screenW 0.2080screenH 0.0407,true)
    exports.editbox:editboxSetText("LOGIN",getPlayerName(localPlayer));
end)

addEventHandler("onClientResourceStop"resourceRoot, function()
    exports.editbox:destroyEditbox("LOGIN")
    exports.editbox:destroyEditbox("HASLO")
end);


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 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 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

local tick getTickCount();

function renderLoginBox()
    local h,h2,h3 interpolateBetween(screenW * -0.5, -0.54, -0.46screenW 00.380.50, (getTickCount()-tick)/3000"Linear");
    guiSetPosition(data.button[1], 0.43h2true);
    guiSetPosition(data.button[2], 0.43h3true);

    dxDrawImage(screenW 0.0000screenW 0screenW 1.0000screenH 1.0000"bg.png"000tocolor(255255255255), false)
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"logowanie.png"000tocolor(255255255255), false)
    
    --dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"zalogujon.png"000tocolor(255255255255), false)
    
    
    if isMouseIn(screenW 0.3698screenH 0.6194screenW 0.0734screenH 0.1046then
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"zalogujon.png"000tocolor(255255255255), false)
    else
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"zalogujoff.png"000tocolor(255255255255), false)
    end
    
    if isMouseIn(screenW 0.5641screenH 0.6204screenW 0.0740screenH 0.1046then
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"zarejestrujon.png"000tocolor(255255255255), false)
    else
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"zarejestrujoff.png"000tocolor(255255255255), false)
    end

    if data.info then dxDrawText(data.infoscreenW 0.3870screenH 0.4361screenW 0.6286screenH 0.4815tocolor(25500255), 1.00"default-bold""center""center"falseend

    dxDrawRectangle(screenW 0.2854screenH 0.3824screenW 0.0750screenH 0.1315tocolor(255,255,2550), false)
    dxDrawRectangle(screenW 0.6422screenH 0.3824screenW 0.0750screenH 0.1315tocolor(255,255,2550), false)

    local fft getSoundFFTData(data.misc20482);
    dxDrawImage(00screenWscreenH"paski.png"000tocolor(255255255fft[1]*256), false);
end




addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.3698screenH 0.6194screenW 0.0734screenH 0.1046) 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="Nale?y wype?ni? wszystkie pola."
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
        if isMouseIn(screenW 0.5641screenH 0.6204screenW 0.0740screenH 0.1046) and data.showed then
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < or string.len(pass) < 3 then
                data.info="Login i has?o powinno zawiera? od 3 do 22 znak?w."
                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)
    showPlayerHudComponent("radar",false)
    setSoundVolume(data.misc1.0)
    showPlayerHudComponent("all",false)
    guiSetInputMode("no_binds_when_editing")
    setElementData(localPlayer,"status","Loguje si?")
    --setElementData(localPlayer,"player:logged",false)
    addEventHandler("onClientRender"rootrenderLoginBox)
    local nick getPlayerNamelocalPlayer )
    data.button[1]=guiCreateEdit(0.420.380.180.05nicktrue)
    data.button[2]=guiCreateEdit(0.420.500.180.05""true)       
    guiEditSetMasked(data.button[2],true)
    
end)


--[[
    ResourceOURGme v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]
-- Pozycja Krecacej Kamery: -1956.66883.3469.31

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

local sx,sy=guiGetScreenSize()
local screenW,screenH 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 tick getTickCount();

function renderZoneBox()
    local h,h2,h3 interpolateBetween(screenW * -0.5, -0.54, -0.46screenW 00.380.50, (getTickCount()-tick)/3000"Linear");
    --guiSetPosition(data.button[1], 0.43h2true);
    --guiSetPosition(data.button[2], 0.43h3true);
    
    dxDrawImage(screenW 0.0000screenW 0screenW 1.0000screenH 1.0000"bg.png"000tocolor(255255255255), false)
    
    if isMouseIn(screenW 0.2182screenH 0.3157screenW 0.1740screenH 0.2667then
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"urzadon.png"000tocolor(255255255255), false)
    else
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"urzadoff.png"000tocolor(255255255255), false)
    end
    
    if isMouseIn(screenW 0.4318screenH 0.3185screenW 0.1724screenH 0.2648then
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"spawnon.png"000tocolor(255255255255), false)
    else
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"spawnoff.png"000tocolor(255255255255), false)
    end
    
    if isMouseIn(screenW 0.6438screenH 0.3176screenW 0.1724screenH 0.2648then
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"przechoon.png"000tocolor(255255255255), false)
    else
    dxDrawImage(screenW 0.0000hscreenW 1.0000screenH 0.9597"przechooff.png"000tocolor(255255255255), false)
    end
    
    --if not isMouseIn(sx*10/1024sy*54/768sx*225/1024sy*92/768then dxDrawRectangle(sx*10/1024sy*54/768sx*225/1024sy*92/768tocolor(151515235), false)
    --else dxDrawRectangle(sx*10/1024sy*54/768sx*225/1024sy*92/768tocolor(1420203235), falseend
    --if not isMouseIn(sx*10/1024sy*198/768sx*225/1024sy*92/768then dxDrawRectangle(sx*10/1024sy*198/768sx*225/1024sy*92/768tocolor(151515235), false)
    --else dxDrawRectangle(sx*10/1024sy*198/768sx*225/1024sy*92/768tocolor(1420203235), falseend

    --dxDrawText("San Fierro"sx*10/1024sy*54/768sx*225/1024 sx*10/1024sy*92/768 sy*54/768white2"default-bold""center""center"false)
    --dxDrawText("Przechowywalnia"sx*10/1024sy*198/768sx*225/1024 sx*10/1024sy*92/768 sy*198/768white2"default-bold""center""center"false)
    
    local domek=getElementData(localPlayer,"player:house")
    if domek then
        dxDrawText("Mieszkanie"screenW 0.1328screenH 0.1083screenW 0.1208screenH 0.1120white2"default-bold""center""center"false)
        if not isMouseIn(screenW 0.1635screenH 0.2574screenW 0.1036screenH 0.1750then dxDrawRectangle(screenW 0.1635screenH 0.2574screenW 0.1036screenH 0.1750tocolor(255255255255), false)
        else dxDrawRectangle(screenW 0.1635screenH 0.2574screenW 0.1036screenH 0.1750tocolor(255255255255), falseend
    end

    --local zone1=math.sin(intro_step/500)*9000
   ---- local zone2=math.cos(intro_step/500)*9000
    --setCameraMatrix (2019.561343.0354.00zone1zone22)
    --intro_step=intro_step-1.5
    local fft getSoundFFTData(data.misc20482);
    dxDrawImage(00screenWscreenH"paski.png"000tocolor(255255255fft[1]*256), false);
    
end

addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.2182screenH 0.3157screenW 0.1740screenH 0.2667) and data.showed then
             setElementData(localPlayer,"player:spawn",{1481.17,-1757.63,17.53+0.1})
             closeZones()
            end
        if isMouseIn(screenW 0.4318screenH 0.3185screenW 0.1724screenH 0.2648) and data.showed then
             setElementData(localPlayer,"player:spawn",{-1969.98616.6135.17+0.1})
             closeZones()
            end
        if isMouseIn(screenW 0.6438screenH 0.3176screenW 0.1724screenH 0.2648) and data.showed then
             setElementData(localPlayer,"player:spawn",{-1969.98616.6135.17+0.1})
             closeZones()
            end
        if isMouseIn(screenW 0.1635screenH 0.2574screenW 0.1036screenH 0.1750then
        local domek=getElementData(localPlayer,"player:house")
        if not domek then
                setElementData(localPlayer,"player:spawn",{387.31, -1521.3032.32+0.1})
        outputChatBox("* Nie posiadasz wykupionego domku. Zostajesz teleportowany 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("radar",true)
    showPlayerHudComponent("crosshair",true)
    showPlayerHudComponent("weapon",true)
    showPlayerHudComponent("radar",true)
    showPlayerHudComponent("health",true)
    showPlayerHudComponent("breath",true)
    showPlayerHudComponent("clock",true)
    showPlayerHudComponent("ammo",true)
    data.showed=false
    destroyElement(blurShader)
    -- Usuwamy elementy
    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)
end

function showZones(misc)
    data.misc=misc
    data.showed=true
    showPlayerHudComponent("all",false)
    guiSetInputMode("no_binds_when_editing")
    addEventHandler("onClientRender"rootrenderZoneBoxend


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-08-10, 13:03


Rumper

Majster od pysa






Wiek: 15
Na forum: 3315 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
W??cz skrypt na editboxy czy tam wgraj z tej paczki co masz panel logowania.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-08-10, 13:38


koko7864

PSEUDO SKRYPTER






Wiek: 22
Na forum: 3230 dni
Posty: 41
Nick w MP: Mar0x

Piwa: 1

Respekt: 50

@Rumper Dzia?a tylko ze mi si? obrazy nie wy?wietlaj? od wybrania spawnu

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-08-10, 14:22


Rumper

Majster od pysa






Wiek: 15
Na forum: 3315 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Dlatego ?e muszisz mie? w folderze ze skryptem te grafiki od wyboru spawnu i doda? je do mety.Albo po prostu nie masz ich dodanych do mety.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-08-10, 15:04


koko7864

PSEUDO SKRYPTER






Wiek: 22
Na forum: 3230 dni
Posty: 41
Nick w MP: Mar0x

Piwa: 1

Respekt: 50

Nie wa?ne ju? ogarne?em sam dzi?ki za pomoc w editboxa

Postaw piwo autorowi tego posta
 

 
Tagi: panel :: logowania :: nie :: pokazuje :: miejsca :: zalogowania :: się
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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