ShowPlayerNameTagForPlayer bug,really wierd and tested 1000 times - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ShowPlayerNameTagForPlayer bug,really wierd and tested 1000 times (
/showthread.php?tid=112065)
ShowPlayerNameTagForPlayer bug,really wierd and tested 1000 times -
PoWerZ - 05.12.2009
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.
Re: ShowPlayerNameTagForPlayer bug,really wierd and tested 1000 times -
Daren_Jacobson - 05.12.2009
Quote:
Originally Posted by Seif_
Use it in OnPlayerStreamIn, not OnPlayerSpawn.
|
do you un-stream when you die? it might be needed in both.