SA-MP Forums Archive
Name Tags - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Name Tags (/showthread.php?tid=171740)



Name Tags - fie - 27.08.2010

Hi,

Can you help me out again?

i want to know how i can type /nametagsoff to turn of the name tags

and /nametagson to turn them back on :P

Thanks

Please reply if this is impossible to make.


Re: Name Tags - Mike_Peterson - 27.08.2010

on top at other variables:
Код:
new gNameTags[MAX_PLAYERS]
also additional:
Код:
gNameTags[playerid] = 1;
under OnPlayerConnect and under OnPlayerDisconnect

Код:
	if (strcmp(cmdtext, "/nametagson", true) == 0)
	{
		for(new i; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				ShowPlayerNameTagForPlayer(playerid, i, 1);
			}
		}
		SendClientMessage(playerid, 0xFFFF00AA, "Nametags are now on.");
		PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
		gNameTags[playerid] = 1;
		return 1;
	}
	
	if (strcmp(cmdtext, "/nametagsoff", true) == 0)
	{
		for(new i; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				ShowPlayerNameTagForPlayer(playerid, i, 0);
			}
		}
		SendClientMessage(playerid, 0xFFFF00AA, "Nametags are now off.");
		PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
		gNameTags[playerid] = 0;
		return 1;
	}



Re: Name Tags - Brian_Furious - 27.08.2010

Try to put
pawn Код:
ShowPlayerNameTagForPlayer(playerid, 0);
in your command

exemple:

Edit: Mike_Peterson has already helped you


Re: Name Tags - fie - 27.08.2010

thanks, much guys