Dynamic3DTextLabel disappear in a certain time.
#1

I have a problem in my server. I wonder why my 3dTextlabel keep disappearing after a certain time I just made a Tagname using Dynamic3dTextlabel attach to the player

When the player login I check if the player has a validdynamic3dtextlabel delete and create again.

here is the code

Код:
//Declaration
new Text3D:TagName[MAX_PLAYERS];

//Function
stock CreatePlayerTagName(playerid)
{
	new szName[MAX_PLAYER_NAME+30];
	if(IsValidDynamic3DTextLabel(TagName[playerid])) DestroyDynamic3DTextLabel(TagName[playerid]);
	if(IsAdminOnDuty[playerid])
	{
		format(szName, sizeof(szName), "{9ACD32}Administrator{FFFFFF}\n%s (%d)", GetPlayerNameEx(playerid), playerid);
		TagName[playerid]  = CreateDynamic3DTextLabel(szName, 0xFFFFFFFF, 0.0, 0.0, 0.0, 40.0, .attachedplayer = playerid, .testlos = 1);
	}
	else
	{
		format(szName, sizeof(szName), "{BBBBBB}Survivor{FFFFFF}\n%s (%d)", GetPlayerNameEx(playerid), playerid);
		TagName[playerid]  = CreateDynamic3DTextLabel(szName, 0xFFFFFFFF, 0.0, 0.0, 0.0, 40.0, .attachedplayer = playerid, .testlos = 1);
	}
	return 1;
}

// OnplayerDisconnect

if(IsValidDynamic3DTextLabel(TagName[playerid])) DestroyDynamic3DTextLabel(TagName[playerid]);

// OnPlayerLoad
CreatePlayerTagName(playerid);
Reply
#2

Which version of streamer you are using.
Syntax for CreateDynamic3DTextLabel in latest verison is:
PHP код:
CreateDynamic3DTextLabel(const text[], colorFloat:xFloat:yFloat:zFloat:drawdistanceattachedplayer INVALID_PLAYER_IDattachedvehicle INVALID_VEHICLE_IDtestlos 0worldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_3D_TEXT_LABEL_SDSTREAMER_TAG_AREA areaid STREAMER_TAG_AREA -1priority 0
Here is a tip
PHP код:
if(IsAdminOnDuty[playerid])
//Instead of formatting it and createing it in each matrix, you can simply format it in each matrix and then Create the Text.
    
{
        
format(szNamesizeof(szName), "{9ACD32}Administrator{FFFFFF}\n%s (%d)"GetPlayerNameEx(playerid), playerid);
        
    }
    else
    {
        
format(szNamesizeof(szName), "{BBBBBB}Survivor{FFFFFF}\n%s (%d)"GetPlayerNameEx(playerid), playerid);
        
    }
TagName[playerid]  = CreateDynamic3DTextLabel(szName0xFFFFFFFF0.00.00.040.0, .attachedplayer playerid, .testlos 1);//you dont need to write .attachedplayer =, instead you can simply put the value at that place. 
Reply
#3

Quote:
Originally Posted by Debjit
Посмотреть сообщение
Which version of streamer you are using.
Syntax for CreateDynamic3DTextLabel in latest verison is:
PHP код:
CreateDynamic3DTextLabel(const text[], colorFloat:xFloat:yFloat:zFloat:drawdistanceattachedplayer INVALID_PLAYER_IDattachedvehicle INVALID_VEHICLE_IDtestlos 0worldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_3D_TEXT_LABEL_SDSTREAMER_TAG_AREA areaid STREAMER_TAG_AREA -1priority 0
Here is a tip
PHP код:
if(IsAdminOnDuty[playerid])
//Instead of formatting it and createing it in each matrix, you can simply format it in each matrix and then Create the Text.
    
{
        
format(szNamesizeof(szName), "{9ACD32}Administrator{FFFFFF}\n%s (%d)"GetPlayerNameEx(playerid), playerid);
        
    }
    else
    {
        
format(szNamesizeof(szName), "{BBBBBB}Survivor{FFFFFF}\n%s (%d)"GetPlayerNameEx(playerid), playerid);
        
    }
TagName[playerid]  = CreateDynamic3DTextLabel(szName0xFFFFFFFF0.00.00.040.0, .attachedplayer playerid, .testlos 1);//you dont need to write .attachedplayer =, instead you can simply put the value at that place. 
Used the latest Plugin streamer.
Reply
#4

Then try this
PHP код:
CreateDynamic3DTextLabel(szName0xFFFFFFFF00040.0playeridINVALID_VEHICLE_ID0, -1, -1, -1100.0); 
Reply
#5

Quote:
Originally Posted by Debjit
Посмотреть сообщение
Which version of streamer you are using.
Syntax for CreateDynamic3DTextLabel in latest verison is:
PHP код:
CreateDynamic3DTextLabel(const text[], colorFloat:xFloat:yFloat:zFloat:drawdistanceattachedplayer INVALID_PLAYER_IDattachedvehicle INVALID_VEHICLE_IDtestlos 0worldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_3D_TEXT_LABEL_SDSTREAMER_TAG_AREA areaid STREAMER_TAG_AREA -1priority 0
Here is a tip
PHP код:
if(IsAdminOnDuty[playerid])
//Instead of formatting it and createing it in each matrix, you can simply format it in each matrix and then Create the Text.
    
{
        
format(szNamesizeof(szName), "{9ACD32}Administrator{FFFFFF}\n%s (%d)"GetPlayerNameEx(playerid), playerid);
        
    }
    else
    {
        
format(szNamesizeof(szName), "{BBBBBB}Survivor{FFFFFF}\n%s (%d)"GetPlayerNameEx(playerid), playerid);
        
    }
TagName[playerid]  = CreateDynamic3DTextLabel(szName0xFFFFFFFF0.00.00.040.0, .attachedplayer playerid, .testlos 1);//you dont need to write .attachedplayer =, instead you can simply put the value at that place. 
Quote:
Originally Posted by Debjit
Посмотреть сообщение
Then try this
PHP код:
CreateDynamic3DTextLabel(szName0xFFFFFFFF00040.0playeridINVALID_VEHICLE_ID0, -1, -1, -1100.0); 
the code of yours doesnt fix the problem lol you it's the same code I did there.
anyways thank you.
Reply
#6

test
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)