[HELP] ShowPlayerNameTagForPlayer
#1

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

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

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

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

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?
Reply
#6

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. =]
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)