Posts: 1,018
Threads: 320
Joined: Jul 2010
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);
Posts: 399
Threads: 9
Joined: Dec 2010
Reputation:
0
OnPlayerStateChange if newstate == PLAYER_STATE_ONFOOT Destroy3DTetLabel(fareLabel[playerid]);
Posts: 1,018
Threads: 320
Joined: Jul 2010
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?
Posts: 399
Threads: 9
Joined: Dec 2010
Reputation:
0
yes the code u provided is fine, now show the code where u try to remove the label
Posts: 1,018
Threads: 320
Joined: Jul 2010
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
Posts: 1,018
Threads: 320
Joined: Jul 2010
How can I solve that problem. Thanks
Posts: 1,018
Threads: 320
Joined: Jul 2010