DisableNameTag help
#3

Quote:
Originally Posted by xTURBOx
Посмотреть сообщение
ShowPlayerNameTagForPlayer
Show that function
ShowPlayerNameTagForPlayer is a native SAMP function.
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer

Quote:
Originally Posted by justjamie
Посмотреть сообщение
Hello,
i need help with my /name off & /name on.
It compiles, but nothing happends.
pawn Код:
{
    if(PlayerInfo[playerid][power] || PlayerInfo[playerid][premium] || PlayerInfo[playerid][playerteam]==HITMAN || PlayerInfo[playerid][playerteam]==FBI || PlayerInfo[playerid][playerlvl]>= 15)
    {
    new tmp[4];
    if(sscanf(params, "s", tmp)) return SCP(playerid, "[on/off]");
    if(strcmp(tmp,"on",true)==0)

    {
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    ShowPlayerNameTagForPlayer(playerid, i, true);
    PlayerTemp[playerid][hname]=0;
  }
  return 1;
    }
    else if(strcmp(tmp,"off",true)==0)
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    ShowPlayerNameTagForPlayer(playerid, i, false);
    PlayerTemp[playerid][hname]=1;
  }
  return 1;
}
}
}
Anything wrong here?
hname is a diffrent script that makes the name Stranger
In order for ShowPlayerNameTagForPlayer to work, ShowNameTags must be set to 1. Also make sure you use ShowPlayerNameTagForPlayer in OnPlayerStreamIn.

pawn Код:
for(new i = GetPlayerPoolSize(); i != -1; --i) ShowPlayerNameTagForPlayer(i, playerid, false);
Your code makes every players name tag disappear for the player writing /name off.
Reply


Messages In This Thread
DisableNameTag help - by justjamie - 31.03.2016, 15:28
Re: DisableNameTag help - by xTURBOx - 31.03.2016, 17:12
Re: DisableNameTag help - by introzen - 31.03.2016, 17:36
Re: DisableNameTag help - by justjamie - 02.04.2016, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)