Hiding nametag for all players
#1

So i had an idea to make a script that could deactivate a player's nametag once said player types a command.
As it turned out, i'm not the only one who's had this idea and plenty of people have been making this script, so i pasted some bits of it over to my own.

The problem is: it doesn't work. The command attaches a mask to the player's head, but it won't hide his nametag to other players.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/mask", true))
	{
		SetPlayerAttachedObject(playerid, 0, 19036, 2, 0.1, 0.05, 0, 90, 90, 0);
  		for(new i = 0; i < MAX_PLAYERS; i++)
	   			{
	   				ShowPlayerNameTagForPlayer(i, playerid, false);
				}
		return 1;
	}
	if(!strcmp(cmdtext, "/maskoff", true))
	{
		RemovePlayerAttachedObject(playerid, 0);
		for(new i = 0; i < MAX_PLAYERS; i++)
				{	   
					ShowPlayerNameTagForPlayer(i, playerid, true);
				}
		return 1;
	}
Can someone help? Thanks.
Reply


Messages In This Thread
Hiding nametag for all players - by Greggu - 29.02.2016, 14:32
Re: Hiding nametag for all players - by Alex Magaсa - 29.02.2016, 14:38
Re: Hiding nametag for all players - by Greggu - 29.02.2016, 16:08
Re: Hiding nametag for all players - by smartasspothead - 29.02.2016, 16:31
Re: Hiding nametag for all players - by Greggu - 29.02.2016, 16:34

Forum Jump:


Users browsing this thread: 1 Guest(s)