Can't hide HUD with TogglePlayerSpectating?
#2

I found 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]) ;
}
Credits to RajatPawar for this code.
Simply use HidePlayerHUD(playerid) to hide the hud and ShowPlayerHUD(playerid) to show it again.
Reply


Messages In This Thread
Can't hide HUD with TogglePlayerSpectating? - by Riwerry - 08.01.2016, 17:44
Re: Can't hide HUD with TogglePlayerSpectating? - by Darkwood17 - 08.01.2016, 18:09
Re: Can't hide HUD with TogglePlayerSpectating? - by Riwerry - 08.01.2016, 21:15

Forum Jump:


Users browsing this thread: 1 Guest(s)