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

Wysłany: 2021-01-21, 12:48


Yami

Mapper / Uczeń LUA






Wiek: 25
Na forum: 3059 dni
Posty: 379

Piwa: 97

Respekt: 235
Respekt: 235Respekt: 235

Siemka mam problem, chc? zrobi? aby po wej?ciu w marker pokazywa?o si? gui ale niestety nie dzia?a.
Jak zrobie po samym cliencie to pokazuje si? ka?demu a chce aby pokazywa?o si? temu co wejdzie w ten marker

client:
gui false

function panel()
    dxDrawImage(0/zoom0/zoom1920/zoom1080/zoom"tlo.png")
    dxDrawText("Napis"0/zoom10/zoom1920/zoom1080/zoomtocolor(255255255), 2"pricedown""center""top")
end

addEvent("pokaz:gui"true)
addEventHandler("pokaz:gui"root, function()
    gui true
    showCursor(true)
    addEventHandler("onClientRender"rootpanel)
end)


server:
local marker createMarker(1432.241241.2014.43"cylinder"11205030200)
setElementDimension(marker11)

addEventHandler("onMarkerHit"marker, function(elmd)
    if getElementType(el) ~= "player" then return end
    if isPedInVehicle(elthen return end
    if not md then return end
        triggerClientEvent(el"pokaz:gui"el)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-21, 13:32


Mikołajj







Wiek: 22
Na forum: 2885 dni
Posty: 303
Nick w MP: Mikołaj

Piwa: 132

Respekt: 91

Spr?buj zmieni? server na:

local marker createMarker(1432.241241.2014.43"cylinder"11205030200)
setElementDimension(marker11)

addEventHandler("onPlayerMarkerHit"root, function(marmd)
    if mar == marker and md then
    if isPedInVehicle(sourcethen return end
        triggerClientEvent(source"pokaz:gui"source)
    end
end)


i client:

gui false

function panel()
    dxDrawImage(0/zoom0/zoom1920/zoom1080/zoom"tlo.png")
    dxDrawText("Napis"0/zoom10/zoom1920/zoom1080/zoomtocolor(255255255), 2"pricedown""center""top")
end

addEvent("pokaz:gui"true)
addEventHandler("pokaz:gui"root, function()
    gui true
    showCursor(true)
    addEventHandler("onClientRender"localPlayerpanel)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-21, 15:05


Yami

Mapper / Uczeń LUA






Wiek: 25
Na forum: 3059 dni
Posty: 379

Piwa: 97

Respekt: 235
Respekt: 235Respekt: 235

Niestety dalej to samo :/
Nic si? nie dzieje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-21, 17:10


Mikołajj







Wiek: 22
Na forum: 2885 dni
Posty: 303
Nick w MP: Mikołaj

Piwa: 132

Respekt: 91

m?j b??d, client:

gui false

function panel()
    dxDrawImage(0/zoom0/zoom1920/zoom1080/zoom"tlo.png")
    dxDrawText("Napis"0/zoom10/zoom1920/zoom1080/zoomtocolor(255255255), 2"pricedown""center""top")
end

addEvent("pokaz:gui"true)
addEventHandler("pokaz:gui"localPlayer, function()
    gui true
    showCursor(true)
    addEventHandler("onClientRender"rootpanel)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-21, 21:15


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Albo najzwyklejszy kod po kliencie, upewnij si? ?e definiujesz zmienn? "zoom":

local script = {}
script.marker createMarker(1432.241241.2014.43"cylinder"11205030200)
setElementDimension(script.marker11)

script.dxDraw = function()
    dxDrawImage(0/zoom0/zoom1920/zoom1080/zoom"tlo.png")
    dxDrawText("Napis"0/zoom10/zoom1920/zoom1080/zoomtocolor(255255255), 2"pricedown""center""top")
end

addEventHandler("onClientMarkerHit"marker, function(thePlayermatchingDimension)
    if (thePlayer ~= getLocalPlayer()) or (getElementType(thePlayer) ~= "player") or (not matchingDimension) or (getPedOccupiedVehicle(thePlayer)) then
        return
    end
    showCursor(true)
    addEventHandler("onClientRender"getLocalPlayer(), script.dxDraw)
end)


Postaw piwo autorowi tego posta
 

 
Tagi: 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 » gui Odpowiedz do tematu

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