Wysłany: 2018-09-01, 15:46
JakisPolak199
wieczny student
Wiek: 20 Na forum: 3510 dni Posty: 131
Nick w MP: bover.
Piwa : 905
Witam, ponownie przychodze z problemem, ze gui sie nie chce wyswietlic tym razem po wejsciu w marker oto kod:
teoriaAPokaz = false
teoriaBPokaz = false
teoriaCPokaz = false
local screenW , screenH = guiGetScreenSize ()
local teoriaA = createMarker ( 2489.12 , - 1686.21 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaA , 1 )
local textA = createElement ( "text" )
setElementData ( textA , "name" , "Cz??? teoretyczna prawa jazdy kat.A" )
setElementPosition ( textA , 2489.12 , - 1686.21 , 51.95 )
setElementInterior ( textA , 1 )
local teoriaB = createMarker ( 2471.55 , - 1676.93 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaB , 1 )
local textB = createElement ( "text" )
setElementData ( textB , "name" , "Cz??? teoretyczna prawa jazdy kat.B" )
setElementPosition ( textB , 2471.55 , - 1676.93 , 51.95 )
setElementInterior ( textB , 1 )
local teoriaC = createMarker ( 2499.44 , - 1672.87 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaC , 1 )
local textC = createElement ( "text" )
setElementData ( textC , "name" , "Cz??? teoretyczna prawa jazdy kat.C" )
setElementPosition ( textC , 2499.44 , - 1672.87 , 51.95 )
setElementInterior ( textC , 1 )
addEventHandler ( "onMarkerLeave" , teoriaA , function( plr )
if teoriaAPokaz == true then
teoriaAPokaz = false
removeEventHandler ( "onClientRender" , root , teoriaAGui )
end
end )
addEventHandler ( "onMarkerHit" , teoriaA , function( plr )
if teoriaAPokaz == false then
teoriaAPokaz = true
addEventHandler ( "onClientRender" , root , teoriaAGui )
end
end )
function teoriaAGui ()
if teoriaAPokaz then
dxDrawRectangle ( screenW * 0.3661 , screenH * 0.0004 , screenW * 0.2690 , screenH * 0.9999 , tocolor ( 0 , 0 , 0 , 168 ), false )
end
end
Wysłany: 2018-09-01, 16:48
Mikołajj
Wiek: 22 Na forum: 2885 dni Posty: 303
Nick w MP: Mikołaj
Piwa : 132
To jest na pewno client-side?
Spr?buj tak:
local screenW , screenH = guiGetScreenSize ()
local teoriaAPokaz = false
local teoriaBPokaz = false
local teoriaCPokaz = false
local teoriaA = createMarker ( 2489.12 , - 1686.21 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaA , 1 )
local textA = createElement ( "text" )
setElementData ( textA , "name" , "Cz??? teoretyczna prawa jazdy kat.A" )
setElementPosition ( textA , 2489.12 , - 1686.21 , 51.95 )
setElementInterior ( textA , 1 )
local teoriaB = createMarker ( 2471.55 , - 1676.93 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaB , 1 )
local textB = createElement ( "text" )
setElementData ( textB , "name" , "Cz??? teoretyczna prawa jazdy kat.B" )
setElementPosition ( textB , 2471.55 , - 1676.93 , 51.95 )
setElementInterior ( textB , 1 )
local teoriaC = createMarker ( 2499.44 , - 1672.87 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaC , 1 )
local textC = createElement ( "text" )
setElementData ( textC , "name" , "Cz??? teoretyczna prawa jazdy kat.C" )
setElementPosition ( textC , 2499.44 , - 1672.87 , 51.95 )
setElementInterior ( textC , 1 )
addEventHandler ( "onClientRender" , root , function()
if teoriaAPokaz == true then
dxDrawRectangle ( screenW * 0.3661 , screenH * 0.0004 , screenW * 0.2690 , screenH * 0.9999 , tocolor ( 0 , 0 , 0 , 168 ), false )
end
end )
addEventHandler ( "onClientMarkerHit" , teoriaA , function( el )
if el ~= localPlayer then return end
if teoriaAPokaz == false then
teoriaAPokaz = true
end
end )
Ostatnio zmieniony przez Mikołajj 2018-09-01, 17:03, w całości zmieniany 1 raz
Wysłany: 2018-09-01, 16:53
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Wysłany: 2018-09-01, 17:00
Qwertick
Coming soon...
Wiek: 23 Na forum: 3577 dni Posty: 472
Nick w MP: Qwertick
Piwa : 2726
teoriaAPokaz = false
teoriaBPokaz = false
teoriaCPokaz = false
local screenW , screenH = guiGetScreenSize ()
local teoriaA = createMarker ( 2489.12 , - 1686.21 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaA , 1 )
local textA = createElement ( "text" )
setElementData ( textA , "name" , "Cz??? teoretyczna prawa jazdy kat.A" )
setElementPosition ( textA , 2489.12 , - 1686.21 , 51.95 )
setElementInterior ( textA , 1 )
local teoriaB = createMarker ( 2471.55 , - 1676.93 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaB , 1 )
local textB = createElement ( "text" )
setElementData ( textB , "name" , "Cz??? teoretyczna prawa jazdy kat.B" )
setElementPosition ( textB , 2471.55 , - 1676.93 , 51.95 )
setElementInterior ( textB , 1 )
local teoriaC = createMarker ( 2499.44 , - 1672.87 , 51.95 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 150 )
setElementInterior ( teoriaC , 1 )
local textC = createElement ( "text" )
setElementData ( textC , "name" , "Cz??? teoretyczna prawa jazdy kat.C" )
setElementPosition ( textC , 2499.44 , - 1672.87 , 51.95 )
setElementInterior ( textC , 1 )
addEventHandler ( "onClientMarkerLeave" , teoriaA , function( plr )
if teoriaAPokaz == true then
teoriaAPokaz = false
removeEventHandler ( "onClientRender" , root , teoriaAGui )
end
end )
addEventHandler ( "onClientMarkerHit" , teoriaA , function( plr )
if teoriaAPokaz == false then
teoriaAPokaz = true
addEventHandler ( "onClientRender" , root , teoriaAGui )
end
end )
function teoriaAGui ()
if teoriaAPokaz then
dxDrawRectangle ( screenW * 0.3661 , screenH * 0.0004 , screenW * 0.2690 , screenH * 0.9999 , tocolor ( 0 , 0 , 0 , 168 ), false )
end
end
Podpis
Kontakt
Discord: Qwertick#1210
Wysłany: 2018-09-01, 17:26
JakisPolak199
wieczny student
Wiek: 20 Na forum: 3510 dni Posty: 131
Nick w MP: bover.
Piwa : 905
Dzia?a mo?na zamyka? @lock
Tagi: gui :: sie :: nie :: wyswietla
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: