Posts: 23
Threads: 3
Joined: Oct 2015
Hello, iґm attempting to toggle off the HUD of the player, because iґm making a custom one.
I found a function using SetPlayerDrunkLevel, but didnґt work properly, so iґm looking for help to do this.
Thanks!
Posts: 23
Threads: 3
Joined: Oct 2015
Quote:
Originally Posted by RedRex
Show us your code!
|
The code was this:
Код:
new _HUDtimer[MAX_PLAYERS] = {-1, ... };
stock HidePlayerHUD(playerid)
{
return (_HUDtimer[playerid] = SetTimerEx("RepeatLevel", 1000, 1, "d", playerid));
}
forward public RepeatLevel(playerid);
public RepeatLevel(playerid)
{
return (SetPlayerDrunkLevel(playerid, 2001)) ;
}
stock ShowPlayerHUD(playerid)
{
if(_HUDtimer[playerid] != -1) KillTimer _HUDtimer[playerid]) ;
}
Didnґt work, i read the wiki of SetPlayerDrunkLevel and the function of toggling off the HUD was if the value was above of 5000, so i put it in 5001. The HUD was toggled, but isnґt a good way of toggling the HUD, because itґs difficult to drive vehicles / walk with that drunk level.
Posts: 23
Threads: 3
Joined: Oct 2015
Quote:
Originally Posted by IdonTmiss
|
I'm making a custom HUD using TDs..
Using F7 isn't effective, im not taking screenshots, im doing a custom hud.
TogglePlayerSpectating also isn't good, i cannot control my character.
Also, thanks for the suggestion, but isn't possible in this case.
Posts: 23
Threads: 3
Joined: Oct 2015