Wysłany: 2019-04-13, 14:14
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
Witam przejd? od razu do rzeczy problem jest w tym ze ze nie wy?wietla si? GUI chocia? powinno, moim zdaniem ..(brak b??d?w w debugu) nie wiem czy dobrze to zrobi?em wiec za pomoc daje
PS: GUI ma si? wy?wietla? gdy si? jest blisko pojazdu
local sx , sy = guiGetScreenSize ()
local x , y = ( sx / 1366 ), ( sy / 768 )
local font = dxCreateFont ( "f/OpenSans-CondBold.ttf" , 22 ) -- 19
function dxDrawInterakcja ( pojazd )
local x , y , z = getElementPosition ( pojazd )
local x2 , y2 , z2 = getElementPosition ( localPlayer )
local odleglosc = getDistanceBetweenPoints3D ( x , y , z , x2 , y2 , z2 )
if odleglosc <= 4 then
if isPedInVehicle ( localPlayer ) == false then
dxDrawTextCustom ( "NACISNIJ [E] ABY WEJSC" , x * 535 , y * 423 , x * 300 , y * 20 , tocolor ( 0 , 0 , 0 , 255 ), 0.60 * y , font , "center" , "center" , true , true , false )
dxDrawTextCustom ( "NACISNIJ [E] ABY WEJSC" , x * 533 , y * 421 , x * 300 , y * 20 , tocolor ( 255 , 255 , 255 , 255 ), 0.60 * y , font , "center" , "center" , true , true , false )
else
dxDrawTextCustom ( "NACISNIJ [E] ABY WYJSC" , x * 642 , y * 622 , x * 300 , y * 20 , tocolor ( 0 , 0 , 0 , 255 ), 0.50 * y , font , "center" , "center" , true , true , false )
dxDrawTextCustom ( "NACISNIJ [E] ABY WYJSC" , x * 640 , y * 620 , x * 300 , y * 20 , tocolor ( 255 , 255 , 255 , 255 ), 0.50 * y , font , "center" , "center" , true , true , false )
end
end
end
addEventHandler ( "onClientRender" , root , function()
for k , v in ipairs ( getElementsByType ( "vehicle" )) do
dxDrawInterakcja ( v )
end
end )
function dxDrawTextCustom ( napis , pozycjaX , pozycjaY , szerokoscX , szerokoscY , kolor , rozmiar , czcionka , wyrownajX , wyrownajY , blokadaY , blokadaX , pozycjaDxDraw )
dxDrawText ( napis , pozycjaX , pozycjaY , szerokoscX + pozycjaX , szerokoscY + pozycjaY , kolor , rozmiar , czcionka or font , wyrownajX , wyrownajY , blokadaY , blokadaX , pozycjaDxDraw )
end
Podpis
Modeler Corporation Sp. Z.O.O
Wysłany: 2019-04-13, 14:36
AmaMa.
AmaMa.#3768
Wiek: 25 Na forum: 3208 dni Posty: 182
Nick w MP: AmaMa.
Piwa : 1825
THEGizmo , R?wnie? nie widz? b??du, ale spr?buj tak:
function dxDrawInterakcja ()
for k , v in ipairs ( getElementsByType ( "vehicle" )) do
local x , y , z = getElementPosition ( v )
local x2 , y2 , z2 = getElementPosition ( localPlayer )
local odleglosc = getDistanceBetweenPoints3D ( x , y , z , x2 , y2 , z2 )
if odleglosc <= 4 then
if isPedInVehicle ( localPlayer ) == false then
dxDrawTextCustom ( "NACISNIJ [E] ABY WEJSC" , x * 535 , y * 423 , x * 300 , y * 20 , tocolor ( 0 , 0 , 0 , 255 ), 0.60 * y , font , "center" , "center" , true , true , false )
dxDrawTextCustom ( "NACISNIJ [E] ABY WEJSC" , x * 533 , y * 421 , x * 300 , y * 20 , tocolor ( 255 , 255 , 255 , 255 ), 0.60 * y , font , "center" , "center" , true , true , false )
else
dxDrawTextCustom ( "NACISNIJ [E] ABY WYJSC" , x * 642 , y * 622 , x * 300 , y * 20 , tocolor ( 0 , 0 , 0 , 255 ), 0.50 * y , font , "center" , "center" , true , true , false )
dxDrawTextCustom ( "NACISNIJ [E] ABY WYJSC" , x * 640 , y * 620 , x * 300 , y * 20 , tocolor ( 255 , 255 , 255 , 255 ), 0.50 * y , font , "center" , "center" , true , true , false )
end
end
end
end
addEventHandler ( "onClientRender" , root , dxDrawInterakcja )
Wysłany: 2019-04-13, 19:06
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
heros123345 , nadal nic brak b??d?w
Wysłany: 2019-04-13, 19:39
NyAngel
Wiek: 22 Na forum: 3950 dni Posty: 128
Nick w MP: NyAngel
Piwa : 556
function dxDrawInterakcja ()
local x , y , z = getElementPosition ( localPlayer )
for k , v in ipairs ( getElementsWithinRange ( x , y , z , 10 , "vehicle" )) do
local x , y , z = getElementPosition ( v )
local x2 , y2 , z2 = getElementPosition ( localPlayer )
local odleglosc = getDistanceBetweenPoints3D ( x , y , z , x2 , y2 , z2 )
if odleglosc <= 4 then
if isPedInVehicle ( localPlayer ) == false then
dxDrawTextCustom ( "NACISNIJ [E] ABY WEJSC" , x * 535 , y * 423 , x * 300 , y * 20 , tocolor ( 0 , 0 , 0 , 255 ), 0.60 * y , font , "center" , "center" , true , true , false )
dxDrawTextCustom ( "NACISNIJ [E] ABY WEJSC" , x * 533 , y * 421 , x * 300 , y * 20 , tocolor ( 255 , 255 , 255 , 255 ), 0.60 * y , font , "center" , "center" , true , true , false )
else
dxDrawTextCustom ( "NACISNIJ [E] ABY WYJSC" , x * 642 , y * 622 , x * 300 , y * 20 , tocolor ( 0 , 0 , 0 , 255 ), 0.50 * y , font , "center" , "center" , true , true , false )
dxDrawTextCustom ( "NACISNIJ [E] ABY WYJSC" , x * 640 , y * 620 , x * 300 , y * 20 , tocolor ( 255 , 255 , 255 , 255 ), 0.50 * y , font , "center" , "center" , true , true , false )
end
end
end
end
addEventHandler ( "onClientRender" , root , dxDrawInterakcja )
Wysłany: 2019-04-13, 19:51
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
NyAngel , tez nie dzia?a twoja opcja
Wysłany: 2019-04-13, 23:49
IgorPL222
LUA
Wiek: 26 Na forum: 3112 dni Posty: 133
Nick w MP: mxgvr
Piwa : 746
Nadpisujesz
local x , y = ( sx / 1366 ), ( sy / 768 )
Pozycj? pojazdu
Wysłany: 2019-04-16, 15:15
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
Do zamkni?cia, poradzi?em se sam ...
Wysłany: 2019-04-16, 15:19
Szay0
Wiek: 24 Na forum: 4191 dni Posty: 90
Nick w MP: szaj
Piwa : 10
Tagi: nie :: wyświetlanie :: się :: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: