Liberty Unleashed
Scripting => Script Help => Topic started by: [RU]Kewun on December 10, 2014, 03:13:31 pm
-
How i can make a health bar and disable the current health hud? how i can do that or can give me an example? please i need this... plz
-
plesae.. i really need this
-
But
i need like gta sa
Health bar
not disable hud
-
Try to play with
http://liberty-unleashed.co.uk/LUWiki/Squirrel/Client/Functions#Progress_Bar_Functions (http://liberty-unleashed.co.uk/LUWiki/Squirrel/Client/Functions#Progress_Bar_Functions)
-
but there arent even examples with it..
-
Try something like:
pPlayer <- FindLocalPlayer();
GUI_Progress <- GUIProgressBar( VectorScreen( 10, ScreenHeight - 30 ), ScreenSize( 350, 30 ) );
if ( GUI_Progress )
{
GUI_Progress.MaxValue = 100;
GUI_Progress.Visible =true
GUI_Progress.Value = pPlayer.Health.tointeger();
}
And then put on timer ( with 1 sec delay):
GUI_Progress.Value = pPlayer.Health.tointeger();
Also, you can get desirable VectorScreen info from Wiki:
http://liberty-unleashed.co.uk/LUWiki/Squirrel/Script_Types/VectorScreen (http://liberty-unleashed.co.uk/LUWiki/Squirrel/Script_Types/VectorScreen)
-
how i can put on a timer? so i paste wiki example and edit it to GUI_Progress.Value = pPlayer.Health.tointeger();
?
can you put a completed script of this? :-[ :-X
im a bit nooby in this squirrel...
-
Forget about timer
Complete CLIENT SCRIPT:
pPlayer <- FindLocalPlayer();
function onScriptLoad()
{
print( "Loaded LU Test Script" );
GUI_Progress <- GUIProgressBar( VectorScreen( 10, ScreenHeight - 30 ), ScreenSize( 350, 30 ) );
if ( GUI_Progress )
{
GUI_Progress.MaxValue = 100;
GUI_Progress.Visible = true
}
return 1;
}
function onClientRender()
{
if(pPlayer && GUI_Progress)
{
GUI_Progress.Value = pPlayer.Health.tointeger();
}
}
-
i added this completed client script and i dont see any health bar.. i put client 1,of course but i dont see the bar of health and whne i put client 0 it has error line 1
-
still no answer..
-
since nobody knows , im locking this topic