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

Wysłany: 2018-07-31, 17:56


DomineQ

lua mejster






Wiek: 22
Na forum: 3960 dni
Posty: 309
Nick w MP: EZ3N

Piwa: 5186

Respekt: 85,8

Witam, posiadam panel logowania ogrpg, usuwam z niego resp i pr?buje doda? pozycje, lecz ca?y czas co? wyskakuje w db. Je?eli kto? by mnie naprowadzi? odwdzi?czy?bym si? :piwo:

c-zone

addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.7562screenH 0.0244screenW 0.2222screenH 0.0822) and data.showed then
         setElementData(localPlayer,"player:spawn",{-1971.47137.9327.69+0.1})
         closeZones()
        end
        if isMouseIn(screenW 0.7562screenH 0.1178screenW 0.2222screenH 0.0822) and data.showed then
         setElementData(localPlayer,"player:spawn",{-1952.34614.9935.02+0.1})
         closeZones()
        end
        if isMouseIn(screenW 0.7562screenH 0.2111screenW 0.2222screenH 0.0822) and data.showed then
         setElementData(localPlayer,"player:spawn",{-1914.24, -850.2632.17+0.1})
         closeZones()
        end
  end
end)


function closeZones()
  showChat(true)
  showCursor(false)
  fadeCamera(false)
  setElementAlpha(localPlayer,255)
  stopSound(data.misc)
  showPlayerHudComponent("all",false)
  showPlayerHudComponent("radar",false)
  showPlayerHudComponent("crosshair",true)
  showPlayerHudComponent("weapon",false)
  showPlayerHudComponent("health",false)
  showPlayerHudComponent("breath",false)
  showPlayerHudComponent("ammo",false)
  data.showed=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"rootrenderZoneBox)
end


c_logging

addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.3539screenH 0.6833screenW 0.1273screenH 0.0875) and data.showed then
            if aktualnie=="logowanie" then
                local login g.user.text
                local pass g.pass.text
                if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < or string.len(pass) < 3 then
                    data.info "Wprowadzi?e? zbyt du?o lub zbyt ma?o znak?w."
                    data.tick getTickCount()+2000
                    return
                end
                triggerServerEvent("logging:checkAccount"resourceRootloginpass)
            end
            if aktualnie=="rejestracja" then
                local login g.user.text
                local pass g.pass.text
                local pass2 g.pass2.text
                if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < or string.len(pass) < 3 then
                    data.info "Wprowadzi?e? zbyt du?o lub zbyt ma?o znak?w."
                    data.tick getTickCount()+2000
                    return
                end
                if pass ~= pass2 then
                    data.info "Podane has?a nie zgadzaj? si?."
                    data.tick getTickCount()+3500
                    return
                end
                triggerServerEvent("logging:newAccount"resourceRootloginpass)
            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)
        local time getRealTime()
        setTime(time.hour,time.minute)
        g.user.visible false
        g.pass.visible false
        g.pass2.visible false
        removeEventHandler("onClientRender"rootrenderLoginBox)
    else
        data.info=info
        data.tick=getTickCount()+5000
    end
end)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-31, 18:06


Hades.

Łiiiiiiiiii






Wiek: 22
Na forum: 4699 dni
Posty: 372
Nick w MP: Hades

Piwa: 3214

Respekt: 337,8
Respekt: 337,8Respekt: 337,8Respekt: 337,8

Bym Ci? naprowadzi? gdyby? powiedzia? co wyskakuje w DB3

Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507

Discord związany z pomocą: https://discord.gg/ttkQTsc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-31, 18:13


DomineQ

lua mejster






Wiek: 22
Na forum: 3960 dni
Posty: 309
Nick w MP: EZ3N

Piwa: 5186

Respekt: 85,8

"Quick" napisał/a:

Bym Ci? naprowadzi? gdyby? powiedzia? co wyskakuje w DB3

To jest dzia?aj?cy kod z wyborem spawnu.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-31, 18:18


Hades.

Łiiiiiiiiii






Wiek: 22
Na forum: 4699 dni
Posty: 372
Nick w MP: Hades

Piwa: 3214

Respekt: 337,8
Respekt: 337,8Respekt: 337,8Respekt: 337,8

"usuwam z niego resp i pr?buje doda? pozycje" Nie czaje, to wko?cu chcesz usun?? resp czy doda??

Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507

Discord związany z pomocą: https://discord.gg/ttkQTsc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-31, 18:19


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Usuwasz instrukcj? warunkow? if isMouseIn(...) a co z tym si? wi??e czyli dane rectangle czy co tam masz te? usuwasz

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-31, 18:41


DomineQ

lua mejster






Wiek: 22
Na forum: 3960 dni
Posty: 309
Nick w MP: EZ3N

Piwa: 5186

Respekt: 85,8

"Kalizman" napisał/a:

Usuwasz instrukcj? warunkow? if isMouseIn(...) a co z tym si? wi??e czyli dane rectangle czy co tam masz te? usuwasz


Wywali?em po prostu ca?e c_zone, a w c_logging w tym miejscu:

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)
        local time getRealTime()
        setTime(time.hour,time.minute)
        g.user.visible false
        g.pass.visible false
        g.pass2.visible false
        removeEventHandler("onClientRender"rootrenderLoginBox)
    else
        data.info=info
        data.tick=getTickCount()+5000
    end
end)


usun??em przechodzenie do c_zone tylko od razu, ?eby wczytywa?o dane.
I teraz tak zrobi?em:

addEvent("logging:result"true)
addEventHandler("logging:result"resourceRoot, function(value,info)
    if not info then info="" end
    if value then
        data.showed=false
        local time getRealTime()
        setTime(time.hour,time.minute)
        g.user.visible false
        g.pass.visible false
        g.pass2.visible false
        stopSound(data.misc)
        showChat(true)
        showCursor(false)
        setElementAlpha(localPlayer,255)
        showPlayerHudComponent("all",false)
         showPlayerHudComponent("radar",false)
         showPlayerHudComponent("crosshair",true)
          showPlayerHudComponent("weapon",false)
          showPlayerHudComponent("health",false)
          showPlayerHudComponent("breath",false)
          showPlayerHudComponent("ammo",false)
        setTimer(triggerEvent2501"gui:start"localPlayer)
        triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        triggerServerEvent("core:spawnPlayer"localPlayer)
        setElementData(localPlayer,"player:spawn",{-1971.47137.9327.69+0.1})
        removeEventHandler("onClientRender"rootrenderLoginBox)
    else
        data.info=info
        data.tick=getTickCount()+5000
    end
end)

w debugu czysto ale zatrzymuje sie kamera, wylacza sie wszystko tak jak powinno ale nie respi i nie wczytuje danych.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-31, 18:56


Hades.

Łiiiiiiiiii






Wiek: 22
Na forum: 4699 dni
Posty: 372
Nick w MP: Hades

Piwa: 3214

Respekt: 337,8
Respekt: 337,8Respekt: 337,8Respekt: 337,8

przer?b poprostu trigger "core:spawnPlayer" i w nim dodaj spawnPlayer i tyle..

Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507

Discord związany z pomocą: https://discord.gg/ttkQTsc
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
DomineQ
Wysłany: 2018-07-31, 19:05


DomineQ

lua mejster






Wiek: 22
Na forum: 3960 dni
Posty: 309
Nick w MP: EZ3N

Piwa: 5186

Respekt: 85,8

"Quick" napisał/a:

przer?b poprostu trigger "core:spawnPlayer" i w nim dodaj spawnPlayer i tyle..


Dzi?ki za pomoc, wszystko dzia?a. :piwo:

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: jak :: usunąć :: wybór :: spawnu :: ustawić :: jeden :: punkt?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jak usunąć wybór spawnu i ustawić jeden punkt? 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