[Bug] AttachPlayer3DTextLabel disappears automatically
#1

Hi,

I have a problem with the 3D Text Labels, when I use the function to attach them on a player (Attach3DTextLabelToPlayer), it disappears automatically after that someone talk or use a commande (every player).

Even when I try it in a FilterScript as simple as that:

pawn Код:
#define FILTERSCRIPT

#include <a_samp>

new Text3D:TestLabel[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/TestLabel", cmdtext, true) == 0)
    {
        TestLabel[playerid] = Create3DTextLabel("Label test",0xc2a2daFF,30.0,40.0,50.0,10.0,-1,1);
        Attach3DTextLabelToPlayer(TestLabel[playerid], playerid, 0.0, 0.0, 0.4);
        return 1;
    }
    return 0;
}
it doesn't work and disappears...

Thanks.
Reply
#2

do u have in ur script any any anything like this

pawn Код:
Delete3DTextLabel(TextLabel[playerid]);
Reply
#3

No.

PS: It's works on an other gamemode, but I can't find the problem in the gamemode where it doesn't work.

There are no Delete3DTextLabel.
Reply
#4

well u show everything in ur gm that isn't working that have attach3dtextlabel? i think i might solve it for u
Reply
#5

Quote:
Originally Posted by GoldZoroGrab
Посмотреть сообщение
well u show everything in ur gm that isn't working that have attach3dtextlabel? i think i might solve it for u
I don't understand what you mean
Reply
#6

do u have in ur gm anything have Attach3dTextLabel??
in the gm that is bugged

if yes show all so i can see problem
Reply
#7

pawn Код:
TestLabel[playerid] = Create3DTextLabel("Label Test", 0xc2a2daFF, 0, 0, 0, 0, 0, 0); // replace this with your and test
Reply
#8

Use this:
pawn Код:
#define FILTERSCRIPT

#include <a_samp>

new Text3D:TestLabel[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/TestLabel", cmdtext, true) == 0)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        TestLabel[playerid] = CreateDynamic3DTextLabel("Label test",0xc2a2daFF,X,Y,Z,playerid,INVALID_VEHICLE_ID,1);
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)