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=72927)



Name tags - cicc - 11.04.2009

Hi!

I have an RP mode (No, its not GF. ) and I have a little problem with name tags.

The first thing is to hide each player's name tag. I don't know which function I should use.

The second thing is a command for admins ( /showname ). If an (rcon) admin type that command, he will be able to see the name tags. And if he type that command again, the name tags will be again in hide.

I can't solve these problems, so please help me.
Thank you.


Re: Name tags - member - 11.04.2009


To hide all player's nametags:
https://sampwiki.blast.hk/wiki/ShowNameTags

The command for admins:
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
(add IsPlayerAdmin) to that for RCON admins.

I think if you disable ShowNameTags under OnGameModeInit, then ShowPlayerNameTagForPlayer function will not work, not sure.


Re: Name tags - Danut - 11.04.2009

Quote:
Originally Posted by [B2K
Hustler ]

To hide all player's nametags:
https://sampwiki.blast.hk/wiki/ShowNameTags

The command for admins:
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
(add IsPlayerAdmin) to that for RCON admins.

I think if you disable ShowNameTags under OnGameModeInit, then ShowPlayerNameTagForPlayer function will not work, not sure.
Where did say it's just for RCON ADMINS , ROFL !?


Re: Name tags - cicc - 11.04.2009

Sorry for double posting.


Re: Name tags - cicc - 11.04.2009

I made this command, but if I type it, the name tag become hidden for a second, but after it will be the same again.

This is the command:

Код:
new ShowNames[MAX_PLAYERS];

if(strcmp(cmd, "/showname", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(ShowNames[playerid] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, true);
}
ShowNames[playerid] = 1;
SendClientMessage(playerid, COLOR_GRAD1, "Name tags enabled.");
}
else if(ShowNames[playerid] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, false);
}
ShowNames[playerid] = 0;
SendClientMessage(playerid, COLOR_GRAD1, "Name tags disabled.");
}
}
return 1;
}
Please help!



Re: Name tags - cicc - 12.04.2009

Nobody can help?


Re: Name tags - cicc - 14.04.2009

...