Problems with dynamic3dtextlabel
#1

Hello everyone so I have a big problem with dynamic3dtextlabel so when player type command /fare and price then he get a label over his head you know what I mean and the problem is when player leaves the bus then that dynamiclabel doesn't remove or destroy but when I use create3dtextlabel then everything is oke but I want all my 3d in dynamic please can you help me. This is my code

pawn Код:
format(string, sizeof(string),"{00C0FF}((Bus LS))\n{00C0FF}Cijena karte: {FFFFFF}$%d", TransportValue[playerid]);
fareLabel[playerid] =   CreateDynamic3DTextLabel(string,SVETLOPLAVA,0.0,0.0,0.9,15.0,playerid,INVALID_VEHICLE_ID,0,-1,-1,-1,100.0);
Reply
#2

OnPlayerStateChange if newstate == PLAYER_STATE_ONFOOT Destroy3DTetLabel(fareLabel[playerid]);
Reply
#3

yes I already have that and doesn't work my friend exit from the bus and the label stay it doesn't remove is that code which I give is fine?
Reply
#4

yes the code u provided is fine, now show the code where u try to remove the label
Reply
#5

pawn Код:
if(newstate == PLAYER_STATE_ONFOOT)
    {
        if(TransportDuty[playerid] > 0)
        {
            if(TransportDuty[playerid] == 1)
            {
                TaxiDrivers -= 1;
            }
            else if(TransportDuty[playerid] == 2)
            {
                BusDrivers -= 1;
            }
            TransportDuty[playerid] = 0;
            format(string, sizeof(string), "* Sad vise nisi na duznosti, zaradio si $%d.", TransportCost[playerid]);
            SendClientMessage(playerid, SVETLOPLAVA, string);
            GivePlayerMoney(playerid, TransportCost[playerid]);
            ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0; TransportCost[playerid] = 0;
            DestroyDynamic3DTextLabel(fareLabel[playerid]);
        }
        TelePos[playerid][0] = 0.0;
        TelePos[playerid][1] = 0.0;
    }
this is where it's know before I put that destrodynamic on the top of the onplayerstatechange
Reply
#6

How can I solve that problem. Thanks
Reply
#7

Anyone. Thanks
Reply
#8

How do you define 'farelabel' ??

pawn Код:
new farelabel[MAX_PLAYERS];
??

If so, you need to change it from 'farelabel', to 'Text3D:farelabel'.

Otherwise, post your entire OnPlayerStateChange and /fare command, and I will do it for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)