SA-MP Forums Archive
[HELP] ShowPlayerNameTagForPlayer - 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: [HELP] ShowPlayerNameTagForPlayer (/showthread.php?tid=113976)



[HELP] ShowPlayerNameTagForPlayer - Nakash - 16.12.2009

I'm having a problem with this code,it shows the player's name!
Is there another way to hide it? is it still working on 0.3?

pawn Код:
if(strcmp(cmd, "/maskon", true) == 0) // by Ellis
    {
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pMask] == 0)
            {
               SendClientMessage(playerid, COLOR_GRAD1, "  You don't have a mask");
               return 1;
            }
            if(PlayerInfo[playerid][pLevel] < 2)
        {
                SendClientMessage(playerid, COLOR_GRAD1, " You can't use it.");
            return 1;
        }
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
            if(IsPlayerConnected(i))
            {
                    ShowPlayerNameTagForPlayer(playerid,i, 0);
                }
            }
            PlayerInfo[playerid][pMaskuse] = 1;
            SendClientMessage(playerid, COLOR_WHITE, "  You have put your mask on [/maskoff to put it away].");
            GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s puts a mask on.", sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        return 1;
    }
Thank you.


Re: [HELP] ShowPlayerNameTagForPlayer - Jefff - 17.12.2009

Quote:
Originally Posted by Uniqueee
I'm having a problem with this code,it shows the player's name!
Is there another way to hide it? is it still working on 0.3?

pawn Код:
if(IsPlayerConnected(playerid))
      {
Disconnected player cant type this command xD so i dont know why u checking this

btw Your answer is here
https://sampwiki.blast.hk/wiki/OnPlayerStreamIn


Re: [HELP] ShowPlayerNameTagForPlayer - Nakash - 17.12.2009

Quote:
Originally Posted by Jefff
Quote:
Originally Posted by Uniqueee
I'm having a problem with this code,it shows the player's name!
Is there another way to hide it? is it still working on 0.3?

pawn Код:
if(IsPlayerConnected(playerid))
      {
Disconnected player cant type this command xD so i dont know why u checking this

btw Your answer is here
https://sampwiki.blast.hk/wiki/OnPlayerStreamIn
Thanks,can you show me an example how to do this?
Like

pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
  ShowNameTagForPlayer(playerid,i,1);
  return 1;
}
I don't know how to do this..



Re: [HELP] ShowPlayerNameTagForPlayer - godknightx - 17.12.2009

pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
  if(PlayerInfo[playerid][pMaskuse] == 1)
    ShowPlayerNameTagForPlayer(forplayerid, playerid, 1);
  else
    ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
}



Re: [HELP] ShowPlayerNameTagForPlayer - Nakash - 17.12.2009

Quote:
Originally Posted by [HUN
SeoTox[Clint] ]
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
  if(PlayerInfo[playerid][pMaskuse] == 1)
    ShowPlayerNameTagForPlayer(forplayerid, playerid, 1);
  else
    ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
}
Thank you very much,is that the only thing i should add?
OnPlayerSTreamIn is a Timer,right?


Re: [HELP] ShowPlayerNameTagForPlayer - wafffllesss - 17.12.2009

Quote:
Originally Posted by Uniqueee
Quote:
Originally Posted by [HUN
SeoTox[Clint] ]
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
  if(PlayerInfo[playerid][pMaskuse] == 1)
    ShowPlayerNameTagForPlayer(forplayerid, playerid, 1);
  else
    ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
}
Thank you very much,is that the only thing i should add?
OnPlayerSTreamIn is a Timer,right?
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
Is a Callback. So you don`t need to forward or do anything else. =]


Re: [HELP] ShowPlayerNameTagForPlayer - Nakash - 17.12.2009

it didn't work,Please guys,i really need this!
[SORRY FOR BUMPING]