(ShowPlayerNameTagForPlayer) Problem.
#1

I got a problem.

Quote:

if (strcmp("/nameoff", cmdtext, true, 7) == 0)
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] ==
{
if (NameOff[playerid] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
SendClientMessage(playerid,COLOR_GREY,"Nobody knows your real identity now!");
NameOff[playerid] = 1;
return 1;
}
}
}
if (strcmp("/nameon", cmdtext, true, 6) == 0)
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] ==
{
if (NameOff[playerid] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
NameOff[playerid] = 0;
SendClientMessage(playerid,COLOR_GREY,"You now have your real identity!");
return 1;
}
}
}

This just won't work !!!
The nametag dissapears like for,1 millisecond.
I tried everything,putting both commands just in one,changing some things but still the same problem.

Please,this command is a very important one for my RPG mode.

If you have time to help me,I would be grateful.
Regards - FreeSoul
Reply
#2

OnPlayerCommandText
pawn Код:
if (strcmp("/namesoff", cmdtext, true, 10) == 0)
    {
    Namesoff(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "You have turned nametags off.");
    return 1;
    }

    if (strcmp("/nameson", cmdtext, true, 10) == 0)
    {
    Nameson(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "You have turned nametags on.");
    return 1;
    }
Anywhere
pawn Код:
stock Namesoff(playerid)
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
  ShowPlayerNameTagForPlayer(playerid, i, false);
  }
}
//---------------------------------------------------
stock Nameson(playerid)
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
  ShowPlayerNameTagForPlayer(playerid, i, true);
  }
}
Reply
#3

Same thing.
If you look at your code and at mine,they are prettyy much the same.
Still won't work.The name togs off just for a second...
Reply
#4

other people have had the same problems as well with this, search and they might contain a solution.

Alternatively, if you want nametags COMPLETELY off use the ShowNameTags function under OnGameModeInit.

https://sampwiki.blast.hk/wiki/ShowNameTags

Note: this will turn off nametags and you will not be able to turn them back on again unless you change enable it or remove that line.

Reply
#5

Quote:
Originally Posted by [B2K
Hustler ]
other people have had the same problems as well with this, search and they might contain a solution.

Alternatively, if you want nametags COMPLETELY off use the ShowNameTags function under OnGameModeInit.

https://sampwiki.blast.hk/wiki/ShowNameTags

Note: this will turn off nametags and you will not be able to turn them back on again unless you change enable it or remove that line.

I searched,they had the same problem.The thread went dead and nobody answered their problems.
In one thread I saw that somebody said that this may be because it's GF or a GF edit and the function doesn't work in GF.
Why doesn't the function work for GF?
Reply
#6

Nobody knows ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)