Name Tags
#1

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

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;
	}
Reply
#3

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

exemple:

Edit: Mike_Peterson has already helped you
Reply
#4

thanks, much guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)