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

Wysłany: 2018-05-03, 17:50


Xrent

-






Wiek: 21
Na forum: 3047 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

Ostrzeżeń: 60%
Siema od pewnego czasu korzystam z dgs i mia?em taki sam problem jak korzystalem z normalnego gui mta wtedy korzysta?em z onClicka i wystarczy?o doda?
Kod:

and state == 'up' then
do ifa isMouseInPosition
i w funkcji (button, state) ale teraz nie wiem jak zrobi? takie co? z dgs

o to kodzik
addEventHandler("onDgsMouseClick"root, function()
    if source == login.loginButton then
        local loginpass DGS:dgsGetText(login.loginEdit), DGS:dgsGetText(login.passEdit)
        if string.len(login) < or string.find(login," ") or string.len(pass) < or string.find(pass," "then outputChatBox("Posiadasz nie dozwolone znaki albo nie wype?ni?e?(/a?) wszystkich p?l.") return end
        triggerServerEvent("registerAccount"localPlayerloginpass)
    elseif source == login.registerButton then
        local loginpass DGS:dgsGetText(login.loginEdit), DGS:dgsGetText(login.passEdit)
        if string.len(login) < or string.find(login," ") or string.len(pass) < or string.find(pass," "then outputChatBox("Posiadasz nie dozwolone znaki albo nie wype?ni?e?(/a?) wszystkich p?l.") return end
        triggerServerEvent("checkAccount"localPlayerloginpass)
    elseif source == login.selectSpawn1 then
        showCursor(false)
        showChat(true)
        local selected 1
        triggerServerEvent("onAnPlayerSelectedSpawn"localPlayerselectedpos)
        DGS:dgsSetVisible(login.selectWindowfalse)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-03, 18:50


TeeNekk

Cienzaruwka :v






Wiek: 23
Na forum: 3210 dni
Posty: 264
Nick w MP: TeeNekk.

Piwa: 919

Respekt: 110,5
Respekt: 110,5

Przecie? ta funkcja ma w parametrach button, oraz state.
Cytat:

Parameters
string button, string state, int absoluteX, int absoluteY
button: the name of the button which will be clicked , it can be left, right, middle
state: the state of the mouse button, will be down if the mouse button was pushed, or up if it was released. Please note currently both up and down state are supported, which is different from onClientGUIClick.
absoluteX: the X position of the mouse cursor, in pixels, measured from the left side of the screen.
absoluteY: the Y position of the mouse cursor, in pixels, measured from the top of the screen.


Podpis
Pomogłem Ci
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-04, 12:45


Xrent

-






Wiek: 21
Na forum: 3047 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

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

Przecie? ta funkcja ma w parametrach button, oraz state.
Cytat:

Parameters
string button, string state, int absoluteX, int absoluteY
button: the name of the button which will be clicked , it can be left, right, middle
state: the state of the mouse button, will be down if the mouse button was pushed, or up if it was released. Please note currently both up and down state are supported, which is different from onClientGUIClick.
absoluteX: the X position of the mouse cursor, in pixels, measured from the left side of the screen.
absoluteY: the Y position of the mouse cursor, in pixels, measured from the top of the screen.
No tak m?j b??d, a jak to u?y? na dgs?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-04, 13:15


TeeNekk

Cienzaruwka :v






Wiek: 23
Na forum: 3210 dni
Posty: 264
Nick w MP: TeeNekk.

Piwa: 919

Respekt: 110,5
Respekt: 110,5

tak samo jak w GUI.
 addEventHandler("onDgsMouseClick"root, function(button,state)
if button == "klawisz" and state == "state" then

zmie? klawisz oraz state na swoje.

Podpis
Pomogłem Ci
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Xrent
Wysłany: 2018-05-04, 15:01


Xrent

-






Wiek: 21
Na forum: 3047 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

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

tak samo jak w GUI.
 addEventHandler("onDgsMouseClick"root, function(button,state)
if button == "klawisz" and state == "state" then

zmie? klawisz oraz state na swoje.

Dzia?a ale troszke inaczej zrobi?em
addEventHandler("onDgsMouseClick"root, function(button,state)
    if source == login.loginButton and state == 'up' then

I masz piwko thx

Postaw piwo autorowi tego posta
 

 
Tagi: onclick :: dgs :: text :: chatbox
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » onClick w dgs x2 text chatBox 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