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, 18:00


Hades.

Łiiiiiiiiii






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

Piwa: 3218

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

CLIENT


x,y = guiGetScreenSize()
button = guiCreateButton(627/1440*x, 510/900*y, 209/1440*x, 123/900*y, "Uruchom Dzwonki", false)
guiSetProperty(button, "NormalTextColour", "FFAAAAAA")
guiSetVisible(button, false)

function drawSyrena()
dxDrawRectangle(600/1440*x, 278/900*y, 261/1440*x, 372/900*y, tocolor(0, 0, 33, 184), false)
dxDrawRectangle(590/1440*x, 265/900*y, 289/1440*x, 16/900*y, tocolor(187, 0, 0, 255), false)
dxDrawText("Dzwonki", 616/1440*x, 346/900*y, 851/1440*x, 445/900*y, tocolor(255, 255, 255, 255), 3.00, "default", "center", "center", false, false, false, false, false)
end

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

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

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

addEvent("playSyrena_cc", true)
addEventHandler("playSyrena_cc", getRootElement(), function()
local syrena = playSound3D("pik.wav",-2305, -174, 42.5, true) 
setSoundMaxDistance(syrena, 150)
setTimer(stopSound,25*1000, 1, syrena)
end)


SERVER

addEventHandler("onMarkerLeave", muker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el, "hideGUI", el)
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
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
adisonboss
Wysłany: 2018-05-15, 06:48


adisonboss







Wiek: 23
Na forum: 3473 dni
Posty: 237

Piwa: 6

Respekt: 50

Sorry ?e tak p??no ale dzi?ki dzia?a. Umiesz rozwi?za? problem z na?o?onym na siebie GUI tak jak na screenie https://imgur.com/a/wahiNl2

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-15, 14:51


Hades.

Łiiiiiiiiii






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

Piwa: 3218

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

A to nie jest czasem od 3d texta(napis nad markerem) ?

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-15, 15:16


adisonboss







Wiek: 23
Na forum: 3473 dni
Posty: 237

Piwa: 6

Respekt: 50

?adnego napisu nad markerem nie ma. Tylko s? dwa markery i w obydwu wy?wietla si? to samo

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-15, 15:39


Hades.

Łiiiiiiiiii






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

Piwa: 3218

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

Poka? ca?y kod z strony clienta

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-15, 16:04


adisonboss







Wiek: 23
Na forum: 3473 dni
Posty: 237

Piwa: 6

Respekt: 50

1. Skrypt

x,y = guiGetScreenSize()
button = guiCreateButton(627/1440*x, 510/900*y, 209/1440*x, 123/900*y, "Uruchom Syrene", false)
guiSetProperty(button, "NormalTextColour", "FFAAAAAA")
guiSetVisible(button, false)

function drawSyrena()
dxDrawRectangle(600/1440*x, 278/900*y, 261/1440*x, 372/900*y, tocolor(0, 0, 33, 184), false)
dxDrawRectangle(590/1440*x, 265/900*y, 289/1440*x, 16/900*y, tocolor(187, 0, 0, 255), false)
dxDrawText("Syrena OSP Fort Carson", 616/1440*x, 346/900*y, 851/1440*x, 445/900*y, tocolor(255, 255, 255, 255), 3.00, "default", "center", "center", false, false, false, false, false)
end

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

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

addEventHandler("onClientGUIClick", button, function()
triggerServerEvent("playSyrena_s", getLocalPlayer())
guiSetVisible(button, false)
removeEventHandler("onClientRender", getRootElement(), drawSyrena)
showCursor(false)
end, false)

addEventHandler("onClientClick", getRootElement(), Closegui) 
addEvent("playSyrena_c", true)
addEventHandler("playSyrena_c", getRootElement(), function()
local syrena = playSound3D("syrena.wav",-146.90988, 1039.63464, 27.25537, true) 
setSoundMaxDistance(syrena, 1800)
setTimer(stopSound,103*1000, 2.5, syrena)
end)


2.Skrypt

x,y = guiGetScreenSize()
button = guiCreateButton(627/1440*x, 510/900*y, 209/1440*x, 123/900*y, "Uruchom Dzwonki", false)
guiSetProperty(button, "NormalTextColour", "FFAAAAAA")
guiSetVisible(button, false)

function drawSyrena()
dxDrawRectangle(600/1440*x, 278/900*y, 261/1440*x, 372/900*y, tocolor(0, 0, 33, 184), false)
dxDrawRectangle(590/1440*x, 265/900*y, 289/1440*x, 16/900*y, tocolor(187, 0, 0, 255), false)
dxDrawText("Dzwonki", 616/1440*x, 346/900*y, 851/1440*x, 445/900*y, tocolor(255, 255, 255, 255), 3.00, "default", "center", "center", false, false, false, false, false)
end

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

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

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

addEvent("playSyrena_cc", true)
addEventHandler("playSyrena_cc", getRootElement(), function()
local syrena = playSound3D("pik.wav",-2305, -174, 42.5, true) 
setSoundMaxDistance(syrena, 150)
setTimer(stopSound,25*1000, 1, syrena)
end)


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 » Przycisk "anuluj" w gui 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