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

Wysłany: 2021-02-21, 23:39


lolciaker12







Wiek: 26
Na forum: 2225 dni
Posty: 6
Nick w MP: Koral



Respekt: 50

Jak wgra?em nowy panel logowania ka?dy ma sid 0

kod panelu logowani c :

setElementData(localPlayer"player:sid"nil)
setElementData(localPlayer"player:logged"false)
--if getPlayerName(localPlayer) ~= "Liberty" then return end
if getElementData(localPlayer"player:sid"then return end


local root getRootElement()
local resourceRoot getResourceRootElement(getThisResource())
local screenWidthscreenHeight guiGetScreenSize()
local sxsy guiGetScreenSize()
local guiInfo = {
    browser = {
        volume 200,
        dimness 90,
        url "https://www.youtube.com/embed/ZqAAjoeu0m4?rel=0&autoplay=1",
        loadTime 8000,
}
}

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

function loadBrowser() 
    loadBrowserURL(guiInfo.browser.browserguiInfo.browser.url)
end

function onBrowserLoad(url)
    if url == guiInfo.browser.url then
        setTimer(setBrowserVolume10002guiInfo.browser.browserguiInfo.browser.volume)
        setTimer(renderLoginBoxguiInfo.browser.loadTime1)
    end
end

local foncik dxCreateFont('Regular.ttf'16/1920 sx)
local foncik2 dxCreateFont('Regular.ttf'11/1920 sx)
function renderLoginBox()
    dxDrawImage(00sxsyguiInfo.browser.browser000)
    dxDrawRectangle(00sxsytocolor(000guiInfo.browser.dimness))
    dxDrawImage(00sxsy'bg1.png'000)
    
    if data.info then dxDrawText(data.info767/1920 sx570/1080 sy1152/1920 sx625/1080sytocolor(255255255200), 1.00foncik2"center""center"falseend
    local x,y=getPointFromDistanceRotation(1413.581082.80distangler)
    setCameraMatrix(x,y,207.72+0.9,2623.691285.660+0.9)
    angler=(angler+0.1)
end





addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(764/1920 sx651/1080 sy395/1920 sx531080 sy) and data.showed then
            local login=exports.editboxy:getEditboxText("login")
            local pass=exports.editboxy:getEditboxText("pass")
            if string.len(login) < or string.len(pass) < 2 then
                data.info="NaleĹĽy wype?&#8218;ni?&#8225; wszystkie pola."
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
        if isMouseIn(762/1920 sx715/1080 sy397/1920 sx53/1080 *sy) and data.showed then
            local login=exports.editboxy:getEditboxText("login")
            local pass=exports.editboxy:getEditboxText("pass")
            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?&#8218;o powinno zawiera?&#8225; 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
        exports.editboxy:destroyEditbox("login")
        exports.editboxy:destroyEditbox("pass")
        destroyElement(guiInfo.browser.browser)
        removeEventHandler("onClientRender"rootrenderLoginBox)
    else
        data.info=tostring(info)
        setTimer(function() data.info=nil end30001)
    end
end)

addEventHandler("onClientResourceStart"resourceRoot, function()
    guiInfo.browser.browser createBrowser(sxsyfalsefalse)
    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?&#8482;")
    --setElementData(localPlayer,"player:logged",false)
    addEventHandler("onClientRender"rootrenderLoginBox)
    local nick getPlayerNamelocalPlayer )
--    data.button[1]=guiCreateEdit(0.0450.500.220.04""..nick..""true)
    --data.button[2]=guiCreateEdit(0.0450.600.220.04""true)
    exports.editboxy:createEditbox("login"0.400.410.200.05true""false90foncikfalse0, { 255255255120 }, true, { 000}, 2true90true"Nazwa uĹĽytkownika", { 255255255160 }, true0fonciktruetrue, {000}, false)
    exports.editboxy:createEditbox("pass"0.400.470.200.05true""true90foncikfalse0, { 255255255120 }, true, { 000}, 2true90true"Has?&#8218;o", { 255255255160 }, true0fonciktruetrue, {000}, false)       
    addEventHandler("onClientBrowserCreated"guiInfo.browser.browserloadBrowser)
    addEventHandler("onClientBrowserDocumentReady" guiInfo.browser.browseronBrowserLoadend)


Ostatnio zmieniony przez NotPaladyn 2021-02-21, 23:57, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-21, 23:48


PatryKK.

Emeryt LUA






Wiek: 26
Na forum: 3060 dni
Posty: 1060
Nick w MP: PatryKK.

Piwa: 2322

Respekt: 331,5
Respekt: 331,5Respekt: 331,5Respekt: 331,5

bledy db3? eldaty zgadzaja sie z pozostalymi ? :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-21, 23:49


_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

Auto_increment w bazie danych na ID.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-22, 13:30


lolciaker12







Wiek: 26
Na forum: 2225 dni
Posty: 6
Nick w MP: Koral



Respekt: 50

mam A_I w bazie danych i dalej to samo el sie zgadzaja w debugu wiec nwm ocb ;(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-22, 14:12


_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


setElementData(localPlayer"player:sid"nil)

Nie dziwi mnie to, usu? t? linijke i wyczy?? konta.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-22, 15:28


lolciaker12







Wiek: 26
Na forum: 2225 dni
Posty: 6
Nick w MP: Koral



Respekt: 50

Dalej to samo ehhh

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-02-24, 15:47


PatryKK.

Emeryt LUA






Wiek: 26
Na forum: 3060 dni
Posty: 1060
Nick w MP: PatryKK.

Piwa: 2322

Respekt: 331,5
Respekt: 331,5Respekt: 331,5Respekt: 331,5

W tabeli ustawione jest Auto_increment?
Tabela wyczyszczona i konta tworzone od nowa?

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: dziala :: sid
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Nie dziala SID 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