Dynamic 3d text labels - issues destroying properly
#1

Hello.

Im using Incognitos streamer plugin (latest version) and i have a code to "mark" players as away when they are paused (when onplayerupdate isn't called)

However, when onplayerupdate is called, i attempt to destroy the textlabel. In the code below, i include two examples i've used, and what it causes online.

PHP код:
new afkvar[MAX_PLAYERS];
new 
Text3D:afk[MAX_PLAYERS]; 
//onplayerupdate2 called every second
if(IsPlayerAfk(i) && GetPVarInt(i"notspawned") == 0)
{
    if(
afkvar[i] == 0)
    {
        
afk[i] = CreateDynamic3DTextLabel("Away / AFK"0xEE0000AA0.00.01.340.0iINVALID_VEHICLE_ID1, -1,-1, -1300.0); 
        
afkvar[i] = 1;    
    }
}
//onplayerupdate:
afkvar[playerid] = 0;
if(
IsValidDynamic3DTextLabel(afk[playerid]))
    
DestroyDynamic3DTextLabel(afk[playerid]);
//no afk tags appear wit this, i think it also affects other labels? I mean, private car labels wont even show now.
//i also tried this on onplayerupdate://
if(afkvar[playerid])
{
    
//remove the text and set afkvar[playerid] = 0;
}
//but text wont dissapear at all times here. So many players have the tag above their heads. 
Is there any ideas what i can do / try ?


Any help would be greatly appreciated.
Reply


Messages In This Thread
Dynamic 3d text labels - issues destroying properly - by denNorske - 11.03.2015, 13:59
Re: Dynamic 3d text labels - issues destroying properly - by Dragonsaurus - 11.03.2015, 14:07
Re: Dynamic 3d text labels - issues destroying properly - by denNorske - 11.03.2015, 14:09
Re: Dynamic 3d text labels - issues destroying properly - by paul988 - 11.03.2015, 14:19
Re: Dynamic 3d text labels - issues destroying properly - by denNorske - 11.03.2015, 14:42

Forum Jump:


Users browsing this thread: 2 Guest(s)