05.12.2009, 14:42
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
trying to fix it with that:
Help please.
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);
}
}
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);
}
}
}