Wysłany: 2021-10-08, 22:16
frigy
Wiek: 20 Na forum: 2042 dni Posty: 13
Nick w MP: frigy
Siemka, mam jeden du?y problem z hudem, a mianowicie chodzi o to ?e napisa?em kod na ukrywanie klasycznego hudu i znika, lecz gdy si? wchodzi ponownie na serwer to ten klasyczny hud si? pojawia.
https://imgur.com/B2Xzcok
function hud ()
setPlayerHudComponentVisible ( "all" , false )
setPlayerHudComponentVisible ( "radar" , false )
setPlayerHudComponentVisible ( "crosshair" , true )
setPlayerHudComponentVisible ( "radar" , ( getElementDimension ( localPlayer ) == 0 ) and ( getElementInterior ( localPlayer ) == 0 ) and getElementData ( localPlayer , "player:logged" ) and not ( getElementData ( localPlayer , "hudoff" ) ~= false ) and not ( getElementData ( localPlayer , "notshowhud" ) ~= false ) and not isBigMapShowing ())
end
Wysłany: 2021-10-08, 22:49
kamison
Przyszły programista .lua
Wiek: 25 Na forum: 3302 dni Posty: 391
Nick w MP: kamison
Piwa : 594
function hud ()
setPlayerHudComponentVisible ( "all" , false )
end
To wystarczy, tylko podepnij pod event clienta -https://wiki.multitheftauto.com/wiki/OnClientPlayerJoin albo servera - https://wiki.multitheftauto.com/wiki/OnPlayerJoin
-- s side
function hud ()
setPlayerHudComponentVisible ( source , "all" , false )
end
addEventHandler ( "onPlayerJoin" , getRootElement (), hud )
-- albo c - side
function hud ()
setPlayerHudComponentVisible ( "all" , false )
end
addEventHandler ( "onClientPlayerJoin" , getRootElement (), hud )
Wysłany: 2021-10-08, 22:57
frigy
Wiek: 20 Na forum: 2042 dni Posty: 13
Nick w MP: frigy
Albo co? ?le robi?, albo nie dzia?a.
Wysłany: 2021-10-09, 01:14
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Nie odpala ci inny zas?b tego hudu?
Wysłany: 2021-10-09, 13:11
frigy
Wiek: 20 Na forum: 2042 dni Posty: 13
Nick w MP: frigy
Wysłany: 2021-10-09, 13:49
Mezo.
Mod-Team
Wiek: 24 Na forum: 3211 dni Posty: 548
Nick w MP: Mezo
Piwa : 6070
Po stronie klienta w panelu logowania podczas wejscia na serwer
setPlayerHudComponentVisible ( "all" , false )
Więcej szczegółów
Wystawiono 1 piw(a):frigy
Wysłany: 2021-10-09, 14:33
frigy
Wiek: 20 Na forum: 2042 dni Posty: 13
Nick w MP: frigy
Dzia?a, dzi?kuj? za pomoc. Temat do zamkni?cia.
Wysłany: 2021-10-09, 15:07
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Tagi: klasyczny :: hud :: mta
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: