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

Wysłany: 2015-07-26, 21:22


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

Ja zrobi? spawn po zalogowaniu? A podczas logowania ma lata?!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-26, 21:25


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Podczas logowania kamera stoi:


Więcej informacji znajdziesz w Wikipedii MTA:

setCameraMatrix



Podczas logowania kamera lata:



Więcej informacji znajdziesz w Wikipedii MTA:

SmoothMoveCamera


Po zalogowaniu:


Więcej informacji znajdziesz w Wikipedii MTA:

spawnPlayer


lub


Więcej informacji znajdziesz w Wikipedii MTA:

setElementPosition


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-26, 21:27


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

A podaj jak ma by? to SmoothMoveCamera...

M?j kod panelu logowania to : client.lua


local x,guiGetScreenSize ()

function mainW ()

    setCameraMatrix (100100100100100100)


    username guiCreateEdit (2547030040""false)
    password guiCreateEdit (2554030040""false)
    guiEditSetMasked (passwordtrue)
    

    loginButton guiCreateButton (2559030080"Loguj"false)
        registerButton guiCreateButton (2568030080"Rejestruj"false)

    --    login guiCreateStaticImage (35537713042"1.png"false)
    
    addEventHandler ("onClientGUIClick"loginButton,
        function (uspa)
            local us guiGetText (username)
            local pa guiGetText (password)    
            triggerServerEvent ("loginReq"getRootElement(), getLocalPlayer(), uspa)
        endfalse
    )
        
    addEventHandler ("onClientGUIClick"registerButton,
        function ()
            local us guiGetText (username)
            local pa guiGetText (password)    
            triggerServerEvent ("registerReq"getRootElement(), getLocalPlayer(), uspa)
        endfalse
    )
    
    showCursor (truetrue)
    guiSetInputEnabled (true)
end
addEventHandler ("onClientResourceStart"getRootElement(), mainW)


function maintaining ()
    dashboard dxDrawRectangle (003509000tocolor (000210), false)

    userLabel dxDrawText("Nick:"150450433284tocolor(255255255255), 1"default""left""top"falsefalsefalsefalsefalse)
    passLabel dxDrawText("Has?o:"150520433335tocolor(255255255255), 1"default""left""top"falsefalsefalsefalsefalse)
            opisLable dxDrawText("Witaj na serwerze Royal-rpg.net.",25300433335tocolor(255255255255), 1"default""left""top"falsefalsefalsefalsefalse)
            passLabel dxDrawText("Posiadamy skrypty pisane przez Vxen!",25315433335tocolor(255255255255), 1"default""left""top"falsefalsefalsefalsefalse)

end
addEventHandler ("onClientRender"rootmaintaining)

addEventHandler("onPlayerJoin"getRootElement(), joinHandler)
addEvent ("hideWindow"true)
addEventHandler ("hideWindow"root,
    function ()
        setCameraTarget (localPlayerlocalPlayer)
        showCursor (falsefalse)
        guiSetInputEnabled (false)
        removeEventHandler ("onClientRender"getRootElement(),  maintaining)
        destroyElement (username)
        destroyElement (password)
        destroyElement (loginButton)
        destroyElement (registerButton)
    end
)



A to kod z server.lua

 function submitLogin (sourceuserpass)
    if (user ~= ""then
        if (pass ~= ""then
            local acc getAccount (userpass)
            if (acc ~= falsethen
                logIn (sourceaccpass)
                outputChatBox ("You logged in successfully."getRootElement(), 255255255false)
                triggerClientEvent (source"hideWindow"source)
            else
                outputChatBox ("Podany dane s? nieprawid?owe!"getRootElement(), 255255255false)
            end
        else
            outputChatBox ("Nie poda?e? has?a!"getRootElement(), 255255255false)
        end
    else
        outputChatBox ("Nie pooda?e? Nicku!"getRootElement(), 255255255false)
    end
end
addEvent ("loginReq"true)
addEventHandler ("loginReq"getRootElement(), submitLogin)

addEvent ("registerReq"true)
addEventHandler ("registerReq"getRootElement(),
    function (sourceNuserNpass)
        if (Nuser ~= "" and Nuser ~= nil and Npass ~= "" and Npass ~= nilthen
            local Nacc addAccount (NuserNpass)
            if Nacc then
                outputChatBox ("Rejestracja zosta?a zako?czona pomy?lnie!"getRootElement(), 255255255)
            end
        end
    end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-26, 22:11


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Ech.. Tylko zr?b za mnie, ta? Nie chce si? nawet w kod zajrze?.

Przeciez masz przyk?ad w tym co podalem na Wiki. Gotowych kod?w nie podajemy bo si? nie nauczysz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-26, 23:18


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

No jak daje tak o
local x,guiGetScreenSize ()

function mainW ()
        smoothMoveCamera (1154.1416, -1766.681316.59381154.1416, -1766.681316.59381154.1416, -1766.681316.59381154.1416, -1766.681316.5938)
    --setCameraMatrix (100100100100100100)

--buttonyPisalne danych
    username guiCreateEdit (2547030040""false)
    password guiCreateEdit (2554030040""false)
    guiEditSetMasked (passwordtrue)
    
--butony logowania    
    loginButton guiCreateButton (2559030080"Loguj"false)
        registerButton guiCreateButton (2568030080"Rejestruj"false)

    --    login guiCreateStaticImage (35537713042"1.png"false)
    
    addEventHandler ("onClientGUIClick"loginButton,
        function (uspa)
            local us guiGetText (username)
            local pa guiGetText (password)    
            triggerServerEvent ("loginReq"getRootElement(), getLocalPlayer(), uspa)
        endfalse
    )
        
    addEventHandler ("onClientGUIClick"registerButton,
        function ()
            local us guiGetText (username)
            local pa guiGetText (password)    
            triggerServerEvent ("registerReq"getRootElement(), getLocalPlayer(), uspa)
        endfalse
    )
    
    showCursor (truetrue)
    guiSetInputEnabled (true)
end
addEventHandler ("onClientResourceStart"getRootElement(), mainW)


function maintaining ()
    dashboard dxDrawRectangle (003509000tocolor (000210), false)

    userLabel dxDrawText("Nick:"150450433284tocolor(255255255255), 1"default""left""top"falsefalsefalsefalsefalse)
    passLabel dxDrawText("Has?o:"150520433335tocolor(255255255255), 1"default""left""top"falsefalsefalsefalsefalse)
            opisLable dxDrawText("Witaj na serwerze Royal-rpg.net.",25300433335tocolor(255255255255), 1"default""left""top"falsefalsefalsefalsefalse)
            passLabel dxDrawText("Posiadamy skrypty pisane przez Vxen!",25315433335tocolor(255255255255), 1"default""left""top"falsefalsefalsefalsefalse)

end
addEventHandler ("onClientRender"rootmaintaining)

addEventHandler("onPlayerJoin"getRootElement(), joinHandler)
addEvent ("hideWindow"true)
addEventHandler ("hideWindow"root,
    function ()
        setCameraTarget (localPlayerlocalPlayer)
        showCursor (falsefalse)
        guiSetInputEnabled (false)
        removeEventHandler ("onClientRender"getRootElement(),  maintaining)
        destroyElement (username)
        destroyElement (password)
        destroyElement (loginButton)
        destroyElement (registerButton)
    end
)

function joinHandler()
    fadeCamera(sourcetrue)
    setCameraTarget(sourcesource)
    outputChatBox("Witaj na moim serwerze!"source)
end
addEventHandler("onPlayerJoin"getRootElement(), joinHandler)
to mi p?? gui ucieka....

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-26, 23:36


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%

        smoothMoveCamera (1154.1416, -1766.681316.59381154.1416, -1766.681316.59381154.1416, -1766.681316.59381154.1416, -1766.681316.5938)

--buttonyPisalne danych
    username guiCreateEdit (2547030040""false)
    password guiCreateEdit (2554030040""false)
    guiEditSetMasked (passwordtrue)
    
--butony logowania    
    loginButton guiCreateButton (2559030080"Loguj"false)
        registerButton guiCreateButton (2568030080"Rejestruj"false)

    --    login guiCreateStaticImage (35537713042"1.png"false)
 


I wywal to cale joinHandler na koncu, bo to jest po stronie serwera, a ty tu masz clienta...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-26, 23:40


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

Wbij na 46.29.17.244:20336 i zobacz co si? dzieje.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-26, 23:42


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
"Vxen" napisał/a:

Wbij na 46.29.17.244:20336 i zobacz co si? dzieje.


Okej, tylko pobiore mta na telefon...
Chlopie, jest 23, nie chce mi sie wracsc na pc...
Zamiast tworzyc offtop to po prostu napisz i podaj bledy z DB3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-26, 23:44


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

A jak mam sprawdzi? te b??dy?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-27, 07:48


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Wpisujesz na serwerze /debugscript 3 i podajesz nam b??dy z tego skryptu, kt?re tam s?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-27, 08:34


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

Gdy wpisze /debugscript 3 to wyskakuje mi co? z ACL a zalogowa? si? nie mog? bo p?? gui ucieka. No ale ju? sam zrobi?em spawn po zalogowaniu, ogarn??em ?e ten kod
    local x 1959.55
    local y = -1714.46
    local z 15
    spawnPlayer(sourcexyz)
trzeba da? po stronie serwera. No a tera musz? zrobi? aby GUI dzia?a?o na wszystkich rozdzia?kach.... Mo?ecie poda? wiki mta z tym tematem? Mo?e co? ograne sam.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-27, 08:48


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

To mo?e zaloguj si? przez /login Vxen has?o ? Wtedy wpisz /debugscript 3 i podaj b??dy.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-27, 09:08


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

Temat do zamkni?cia. Kolega mi to zrobi?. :(

Postaw piwo autorowi tego posta
 

 
Tagi: spawn :: zalogowaniu?
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