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

Wysłany: 2018-09-02, 20:29


JakisPolak199

wieczny student






Wiek: 20
Na forum: 3510 dni
Posty: 131
Nick w MP: bover.

Piwa: 905

Respekt: 150
Respekt: 150Respekt: 150

Witam mam taki problem, ?e gui pokazuje si? dla wszystkich. kod jest po stronie clienta kod:
teoriaAPokaz false
teoriaBPokaz false
teoriaCPokaz false
local screenWscreenH guiGetScreenSize()

local teoriaA createMarker (2489.12, -1686.2151.95-1"cylinder"1.5255255255150)
setElementInterior(teoriaA1)
local textA createElement("text")
setElementData(textA"name""Cz??? teoretyczna prawa jazdy kat.A")
setElementPosition(textA2489.12, -1686.2151.95)
setElementInterior(textA1)

local teoriaB createMarker (2471.55, -1676.9351.95-1"cylinder"1.5255255255150)
setElementInterior(teoriaB1)
local textB createElement("text")
setElementData(textB"name""Cz??? teoretyczna prawa jazdy kat.B")
setElementPosition(textB2471.55, -1676.9351.95)
setElementInterior(textB1)

local teoriaC createMarker (2499.44, -1672.8751.95-1"cylinder"1.5255255255150)
setElementInterior(teoriaC1)
local textC createElement("text")
setElementData(textC"name""Cz??? teoretyczna prawa jazdy kat.C")
setElementPosition(textC2499.44, -1672.8751.95)
setElementInterior(textC1)

addEventHandler("onClientMarkerLeave"teoriaA, function(plr)
if teoriaAPokaz == true then
    teoriaAPokaz false
    removeEventHandler("onClientRender"rootteoriaAGui)
end
end)

addEventHandler("onClientMarkerHit"teoriaA, function(plr)
if teoriaAPokaz == false then
    teoriaAPokaz true
    addEventHandler("onClientRender"rootteoriaAGui)
end
end)

function teoriaAGui(plr)
    if teoriaAPokaz then
        dxDrawRectangle(screenW 0.3661screenH 0.0004screenW 0.2690screenH 0.9999tocolor(000168), false)
    end
end


Podpis
Kontakt mailowo: [email protected]
Kontakt Discord: bover.

Portfolio: https://boversoneg.github.io/

socialproject.pl // discord.gg/socialproject
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-02, 20:39


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

do ka?dego addEventHandleru (onClientMarkerHit etc.) dodaj warunek
if plr ~= localPlayer then return end

Powinno dzia?a?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 13:35


nanKy







Wiek: 22
Na forum: 3866 dni
Posty: 498
Nick w MP: nanky

Piwa: 1773

Respekt: 239
Respekt: 239Respekt: 239

"Kalizman" napisał/a:

do ka?dego addEventHandleru (onClientMarkerHit etc.) dodaj warunek
if plr ~= localPlayer then return end

Powinno dzia?a?.


To raczej za trudne dla ludzi kt?rzy podmieniaj? tylko nazw? serwerka w paczkach ogrpg.

Masz tu gotowy kod:


addEventHandler("onClientMarkerLeave"teoriaA, function(plr,dim)
if plr ~= localPlayer or not dim then return end
if teoriaAPokaz == true then
    teoriaAPokaz false
    removeEventHandler("onClientRender"rootteoriaAGui)
end
end)

addEventHandler("onClientMarkerHit"teoriaA, function(plr,dim)
if plr ~= localPlayer or not dim then return end
if teoriaAPokaz == false then
    teoriaAPokaz true
    addEventHandler("onClientRender"rootteoriaAGui)
end
end)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Kalizman
Tagi: gui :: pokazuje :: sie :: dla :: wszystkich
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 pokazuje sie dla wszystkich 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