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

Wysłany: 2018-05-12, 08:59


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

Witam mam problem. Nie wiem jak zrobi? przycisk "anuluj". Za pomoc daje :piwo: i R* . Tak wygl?da kod


x,guiGetScreenSize()
button guiCreateButton(627/1440*x510/900*y209/1440*x123/900*y"Uruchom Dzwonki"false)
guiSetProperty(button"NormalTextColour""FFAAAAAA")
guiSetVisible(buttonfalse)

function drawSyrena()
dxDrawRectangle(600/1440*x278/900*y261/1440*x372/900*ytocolor(0033184), false)
dxDrawRectangle(590/1440*x265/900*y289/1440*x16/900*ytocolor(18700255), false)
dxDrawText("Dzwonki"616/1440*x346/900*y851/1440*x445/900*ytocolor(255255255255), 3.00"default""center""center"falsefalsefalsefalsefalse)
end

addEvent("showGUI"true)
addEventHandler("showGUI"getRootElement(), function()
guiSetVisible(buttontrue)
addEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(true)
end)

addEventHandler("onClientGUIClick"button, function()
triggerServerEvent("playSyrena_sc"getLocalPlayer())
guiSetVisible(buttonfalse)
removeEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(false)
endfalse)

function Closegui(buttonstate)
    if panel and button == "left" and state == "down" then
           if cursorPosition(screenW 0.5688screenH 0.6094screenW 0.6501screenH 0.6549then
                        removeEventHandler("onClientRender",rootpaneldx)
                        panel false
                        showCursor (false) 
         end
    end
end
addEventHandler("onClientClick"getRootElement(), Closegui)

addEvent("playSyrena_cc"true)
addEventHandler("playSyrena_cc"getRootElement(), function()
local syrena playSound3D("pik.wav",-2305, -17442.5truesetSoundMaxDistance(syrena150)
setTimer(stopSound,25*10001syrena)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-12, 09:54


TeeNekk

Cienzaruwka :v






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

Piwa: 919

Respekt: 110,5
Respekt: 110,5

function Closegui(buttonstate)
    if panel and button == "left" and state == "down" then
           if cursorPosition(590/1440*x265/900*y289/1440*x16/900*ythen -- podmietu pozycjena pozycje buttona
                        removeEventHandler("onClientRender",getRootElement(), drawSyrena)
                        panel false
                        showCursor (false) 
         end
    end
end
addEventHandler("onClientClick"getRootElement(), Closegui


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-12, 17:04


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

Nadal nie dzia?a

function Closegui(buttonstate)
    if panel and button == "left" and state == "down" then
           if cursorPosition(screenW 0.5688screenH 0.6094screenW 0.6501screenH 0.6549then
                        removeEventHandler("onClientRender",getRootElement(), drawSyrena)
                        panel false
                        showCursor (false) 
         end
    end
end
addEventHandler("onClientClick"getRootElement(), Closegui


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-12, 17:09


Hades.

Łiiiiiiiiii






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

Piwa: 3214

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


function Closegui(buttonstate)
    if panel and button == "left" and state == "down" then
           if cursorPosition(screenW 0.5688screenH 0.6094screenW 0.6501screenH 0.6549then -- sk?d te kordy s??
                        removeEventHandler("onClientRender",rootpaneldx)
                        panel false
                        showCursor (false) 
         end
    end
end
addEventHandler("onClientClick"getRootElement(), Closegui)


Sk?d wytrzasn??e? te kordy w if cursorPosition, je?li ich nie widze nigdzie w kodzie.

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):
Mezo.
Wysłany: 2018-05-12, 17:15


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

To sk?d mam wzi?? w?asne ?
Gui w og?le nie ogarniam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-12, 17:18


Hades.

Łiiiiiiiiii






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

Piwa: 3214

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


function Closegui(buttonstate)
    if panel and button == "left" and state == "down" then
           if cursorPosition(590/1440*x265/900*y289/1440*x16/900*ythen
                        removeEventHandler("onClientRender",rootpaneldx)
                        panel false
                        showCursor (false) 
         end
    end
end
addEventHandler("onClientClick"getRootElement(), Closegui)


zobacz teraz

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-05-12, 17:21


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

Nadal nic, a mo?e musz? stworzy? taki przycisk jak na w??czanie syreny ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-12, 17:21


Hades.

Łiiiiiiiiii






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

Piwa: 3214

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

?atwiej ci b?dzie dorobic przycisk za pomoc? dxDrawRectangle.

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-05-12, 17:23


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

A jest mo?e do tego jaki? poradnik bo kompletnie nie umiem Gui. Pierwszy raz mam z tym styczno??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-12, 17:25


Hades.

Łiiiiiiiiii






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

Piwa: 3214

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

A moge wiedzie? za pomoc? czego otwierasz gui? Komenda, wej?cie w marker czy jak ?

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-05-12, 17:25


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

Wej?cie w marker i mam uruchom syrene OSP i chc? przycisk anuluj

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-12, 17:29


Hades.

Łiiiiiiiiii






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

Piwa: 3214

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

Daj mi skrawek kodu z funkcj? addEventHandler("onMarkerHit"

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-05-12, 17:32


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

To ?

local mukercreateMarker( -2304, -17841.5"cylinder"1.0000170) 

function marker(elmd) 
 if getElementType(el)~="player" then return end
  if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(el)),aclGetGroup("PSP")) then 
   triggerClientEvent(el"showGUI"el)
 end 
end
addEventHandler ("onMarkerHit"mukermarker)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-12, 17:34


Hades.

Łiiiiiiiiii






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

Piwa: 3214

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

Zamiast przycisku zrobi?em ci zamkni?cie panelu odrazu po wyj?ciu z markera.

Do strony servera dodaj:

addEventHandler("onMarkerLeave"marker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)


A strone client'a daj tak?:

x,guiGetScreenSize()
button guiCreateButton(627/1440*x510/900*y209/1440*x123/900*y"Uruchom Dzwonki"false)
guiSetProperty(button"NormalTextColour""FFAAAAAA")
guiSetVisible(buttonfalse)

function drawSyrena()
dxDrawRectangle(600/1440*x278/900*y261/1440*x372/900*ytocolor(0033184), false)
dxDrawRectangle(590/1440*x265/900*y289/1440*x16/900*ytocolor(18700255), false)
dxDrawText("Dzwonki"616/1440*x346/900*y851/1440*x445/900*ytocolor(255255255255), 3.00"default""center""center"falsefalsefalsefalsefalse)
end

addEvent("showGUI"true)
addEventHandler("showGUI"getRootElement(), function()
guiSetVisible(buttontrue)
addEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(truetrue)
end)

addEvent("hideGUI"true)
addEventHandler("hideGUI"getRootElement(), function()
    guiSetVisible(buttonfalse)
    removeEventHandler("onClientRender"getRootElement(), drawSyrena)
    showCursor(false)
    panel=false
end)

addEventHandler("onClientGUIClick"button, function()
triggerServerEvent("playSyrena_sc"getLocalPlayer())
guiSetVisible(buttonfalse)
removeEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(false)
endfalse)

addEvent("playSyrena_cc"true)
addEventHandler("playSyrena_cc"getRootElement(), function()
local syrena playSound3D("pik.wav",-2305, -17442.5truesetSoundMaxDistance(syrena150)
setTimer(stopSound,25*10001syrena)
end)



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-05-12, 17:43


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

1. Tylko ?e ja nie mog? si? rusza? w markerze
2. Nie dzia?a i jest taki oto b??d https://imgur.com/a/DUWPX8f

Postaw piwo autorowi tego posta
 

 
Tagi: przycisk :: quotanulujquot :: gui
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