:3DTextLabel: Overlaps the previous one.
#1

Basically time updates and when it gets down to 1, I want this (Tired) text to appear, but the problem is that it overlaps the previous text

(Tired|) Text
pawn Код:
if(PlayerInfo[playerid][pBWTime] <= 1)
        {
            TogglePlayerControllable(playerid, 1);
            SetCameraBehindPlayer(playerid);
            PlayerInfo[playerid][pBW] = 2;
            PlayerInfo[playerid][pBWTime] = 0;
            PlayerInfo[playerid][pBWTime2] = 2;
            PlayerInfo[playerid][pIntBW] = 0;
            PlayerInfo[playerid][pPos_xBW] = 0;
            PlayerInfo[playerid][pPos_yBW] = 0;
            PlayerInfo[playerid][pPos_zBW] = 0;
            SetPlayerDrunkLevel(playerid, 5000);
            TextDrawHideForPlayer(playerid,TextdrawBW);
            PlayerTextDrawHide(playerid,TextdrawBW2[playerid]);
            SetPlayerHealth(playerid, 20);

            Delete3DTextLabel(pTextID[playerid]);
            format(nameformat,sizeof(nameformat),"%s (%d)\n(Tired)",pName,playerid);
            pTextID[playerid] = Create3DTextLabel(nameformat,COLOR_WHITE,X,Y,Z+0.13,15,0,0);
            Update3DTextLabelText(pTextID[playerid],COLOR_WHITE,nameformat);
            Attach3DTextLabelToPlayer(pTextID[playerid], playerid, 0.0, 0.0, 0.13);
Previous text
pawn Код:
Delete3DTextLabel(pTextID[playerid]);
                format(nameformat,sizeof(nameformat),"%s (%d)\n(Sleeping, %dmin)",pName,playerid,PlayerInfo[playerid][pBWTime]);
                pTextID[playerid] = Create3DTextLabel(nameformat,COLOR_WHITE,X,Y,Z+0.13,15,0,0);
                Update3DTextLabelText(pTextID[playerid],COLOR_WHITE,nameformat);
                Attach3DTextLabelToPlayer(pTextID[playerid], playerid, 0.0, 0.0, 0.13);
And also the sleeping time overlaps when updates, It starts on (Sleeping, 3) and then the 2 is on top of that 3, and then 1min comes on top of 2 and 3.

Any ideas how to stop it overlapping?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)