Dynamic3DTextLabel disappear in a certain time. -
ToiletDuck - 19.10.2017
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);
Re: Dynamic3DTextLabel disappear in a certain time. -
Zeth - 19.10.2017
Which version of streamer you are using.
Syntax for CreateDynamic3DTextLabel in latest verison is:
PHP код:
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 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(szName, sizeof(szName), "{9ACD32}Administrator{FFFFFF}\n%s (%d)", GetPlayerNameEx(playerid), playerid);
}
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);//you dont need to write .attachedplayer =, instead you can simply put the value at that place.
Re: Dynamic3DTextLabel disappear in a certain time. -
ToiletDuck - 19.10.2017
Quote:
Originally Posted by Debjit
Which version of streamer you are using.
Syntax for CreateDynamic3DTextLabel in latest verison is:
PHP код:
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 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(szName, sizeof(szName), "{9ACD32}Administrator{FFFFFF}\n%s (%d)", GetPlayerNameEx(playerid), playerid);
}
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);//you dont need to write .attachedplayer =, instead you can simply put the value at that place.
|
Used the latest Plugin streamer.
Re: Dynamic3DTextLabel disappear in a certain time. -
Zeth - 19.10.2017
Then try this
PHP код:
CreateDynamic3DTextLabel(szName, 0xFFFFFFFF, 0, 0, 0, 40.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
Re: Dynamic3DTextLabel disappear in a certain time. -
ToiletDuck - 19.10.2017
Quote:
Originally Posted by Debjit
Which version of streamer you are using.
Syntax for CreateDynamic3DTextLabel in latest verison is:
PHP код:
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 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(szName, sizeof(szName), "{9ACD32}Administrator{FFFFFF}\n%s (%d)", GetPlayerNameEx(playerid), playerid);
}
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);//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(szName, 0xFFFFFFFF, 0, 0, 0, 40.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
|
the code of yours doesnt fix the problem lol you it's the same code I did there.
anyways thank you.
Re: Dynamic3DTextLabel disappear in a certain time. -
TitoRayne - 19.10.2017
test