Toggling player HUD
#3

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.
Reply


Messages In This Thread
Toggling player HUD - by FedeA - 19.07.2018, 01:28
Re: Toggling player HUD - by RedRex - 19.07.2018, 01:29
Re: Toggling player HUD - by FedeA - 19.07.2018, 01:32
Re: Toggling player HUD - by IdonTmiss - 19.07.2018, 04:10
Re: Toggling player HUD - by FedeA - 19.07.2018, 04:18
Re: Toggling player HUD - by FedeA - 20.07.2018, 00:23

Forum Jump:


Users browsing this thread: 1 Guest(s)