SA-MP Forums Archive
Problems with dynamic3dtextlabel - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problems with dynamic3dtextlabel (/showthread.php?tid=453358)



Problems with dynamic3dtextlabel - Luca12 - 24.07.2013

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);



Re: Problems with dynamic3dtextlabel - -Prodigy- - 24.07.2013

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


Re: Problems with dynamic3dtextlabel - Luca12 - 24.07.2013

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?


Re: Problems with dynamic3dtextlabel - -Prodigy- - 24.07.2013

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


Re: Problems with dynamic3dtextlabel - Luca12 - 24.07.2013

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


Re: Problems with dynamic3dtextlabel - Luca12 - 25.07.2013

How can I solve that problem. Thanks


Re: Problems with dynamic3dtextlabel - Luca12 - 26.07.2013

Anyone. Thanks


Re: Problems with dynamic3dtextlabel - Threshold - 26.07.2013

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.