SA-MP Forums Archive
Hide Player Above Head Details. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Hide Player Above Head Details. (/showthread.php?tid=396311)



Hide Player Above Head Details. - Laure - 30.11.2012

How can i make a command that hides a players name hp,armor, no one can see when the command activated?I checked out the mask's filterscript but wasnt how i wanted.

Help will be appreciated.


Re: Hide Player Above Head Details. - gtakillerIV - 30.11.2012

Use the function ShowPlayerNameTagForPlayer.

pawn Код:
for(new i; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                ShowPlayerNameTagForPlayer(playerid, i, false);
            }
        }
Example Command:

pawn Код:
CMD:hideme(playerid, params[])
{
    if(Hidden[playerid] == 1)
    {
        for(new i; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                ShowPlayerNameTagForPlayer(playerid, i, true);
            }
        }
    }
    else if(Hidden[playerid] == 0)
    {
        for(new i; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                ShowPlayerNameTagForPlayer(playerid, i, false);
            }
        }
    }
    return 1;
}



Re: Hide Player Above Head Details. - Laure - 30.11.2012

So if i use the command above no one can see my name's etc?


Re: Hide Player Above Head Details. - gtakillerIV - 30.11.2012

Yep.