ShowPlayerNameTagForPlayer bug,really wierd and tested 1000 times
#1

I'm have a variable which is the status of the player tag - hide/show.
I have 2 commands, /hide and /show.
the problem is that when i do /hide to hide someone's tag , it works and no one see this player tag
but after any death of me, I can see this player tag.
Example:
I use /hide 2
ID 2 variable changes to true
it executes the function to hide his tag.
ID 2 tag is hidden.
then i die
And ID 2 Tag is showen.

so i tried to solve it with this sulotion:
I added the code to hide players tag which have a 'true' variable in public OnPlayerSpawn
and it still "ignores" it and the tag is showen.
I think it's a bug or something...

From cmd part - which works
pawn Код:
PlayerInvisible[giveplayerid] = true;
for(new i = 0; i < MAX_PLAYERS; i++)
 {
  if(IsPlayerConnected(i))
  {
  ShowPlayerNameTagForPlayer(i,giveplayerid,0);
  }
 }
trying to fix it with that:
pawn Код:
OnPlayerSpawn(playerid)
{
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
  if(IsPlayerConnected(i))
  {
   if(PlayerInvisible[i] == true)
   {
   ShowPlayerNameTagForPlayer(playerid,i,0);
   }
   else
   {
   ShowPlayerNameTagForPlayer(playerid,i,1);
   }
  }
 }
Help please.
Reply
#2

Quote:
Originally Posted by Seif_
Use it in OnPlayerStreamIn, not OnPlayerSpawn.
do you un-stream when you die? it might be needed in both.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)