Help with 3D Text Labels
#1

Okay, hello. I've made 4 classes to my CoD server, and I'm making 3D text labels to show if a player is, for example: Engineer.

I just can't get them work, they worked one time like, that it showed the text on the players head, but when player died & spawned and chose a new class, it messed up.

Then I tried to do something else, and I ended up with this:

pawn Код:
new PlayerText3D:Recon;
new PlayerText3D:Engineer;
new PlayerText3D:Medic;
new PlayerText3D:Assault;
Just for one class:

pawn Код:
Recon = CreatePlayer3DTextLabel(playerid,"Recon",0x000FFFFF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Text3D:Recon, playerid, 0.0, 0.0, 0.7);
IsRecon[playerid] = 1;
OnPlayerDeath:

pawn Код:
if(IsRecon[playerid] == 1)
    {
        UpdatePlayer3DTextLabelText(playerid, PlayerText3D:Recon, 0xFFFA00FF, " ");
        DeletePlayer3DTextLabel(playerid, PlayerText3D:Recon);
    }
    if(IsAssault[playerid] == 1)
    {
        UpdatePlayer3DTextLabelText(playerid, PlayerText3D:Assault, 0xFFFA00FF, " ");
        DeletePlayer3DTextLabel(playerid, PlayerText3D:Assault);
    }
    if(IsMedic[playerid] == 1)
    {
        UpdatePlayer3DTextLabelText(playerid, PlayerText3D:Medic, 0xFFFA00FF, " ");
        DeletePlayer3DTextLabel(playerid, PlayerText3D:Medic);
    }
    if(IsEngineer[playerid] == 1)
    {
        UpdatePlayer3DTextLabelText(playerid, PlayerText3D:Engineer, 0xFFFA00FF, " ");
        DeletePlayer3DTextLabel(playerid, PlayerText3D:Engineer);
    }

    IsMedic[playerid] = 0;
    IsRecon[playerid] = 0;
    IsAssault[playerid] = 0;
    IsEngineer[playerid] = 0;
    //These are also in 'OnPlayerConnect', and 'OnPlayerDisconnect'.
That ain't working either. The problem is with that, that sometimes it creates a 3D text label, but far, far away from the player, and I can't find nothing wrong in the code. Annoying.

If someone could help me with this, I would appreciate it.
Reply


Messages In This Thread
Help with 3D Text Labels - by ExeC - 20.01.2011, 13:08
Re: Help with 3D Text Labels - by Infamous - 20.01.2011, 13:22
Re: Help with 3D Text Labels - by ExeC - 20.01.2011, 13:35
Re: Help with 3D Text Labels - by Infamous - 20.01.2011, 13:44
Re: Help with 3D Text Labels - by Toreno - 20.01.2011, 13:58
Re: Help with 3D Text Labels - by ExeC - 21.01.2011, 09:40

Forum Jump:


Users browsing this thread: 1 Guest(s)