SA-MP Forums Archive
Question - 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: Question (/showthread.php?tid=278190)



Question - Tanush123 - 21.08.2011

How can i make nobody could see anyone name tag??


Re: Question - =WoR=G4M3Ov3r - 21.08.2011

PHP Code:
ShowPlayerNameTagForPlayer(playeridifalse



Re: Question - Tanush123 - 21.08.2011

i put taht in on player connect but it still shows


Re: Question - =WoR=G4M3Ov3r - 21.08.2011

STRCMP:

PHP Code:
if (strcmp("/nametagsoff"cmdtexttrue) == 0)
{
     if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"You are not authorized to use that     command!");
    for(new 
0MAX_PLAYERSi++) ShowPlayerNameTagForPlayer(playeridifalse);
    
GameTextForPlayer(playerid"~W~Nametags ~R~off"50005);
    return 
1;

ZCMD:

PHP Code:
CMD:nametagsoff((playeridparams[]))
{
     if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"You are not authorized to use that     command!");
    for(new 
0MAX_PLAYERSi++) ShowPlayerNameTagForPlayer(playeridifalse);
    
GameTextForPlayer(playerid"~W~Nametags ~R~off"50005);
    return 
1;

Made it an admin cmd, You can Disable and Enable it yourself.


Re: Question - DJDhan - 21.08.2011

You might want to check the wiki for more info on ShowPlayerNameTagForPlayer.

Calling that function alone won't do anything. try adding below to OnPlayerConnect callback:

Code:
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);