Delete3DTextLabel dosent delete it
#1

Im trying to make some 3d labels to some locked vehicles, they show up on them, but dosent go away when they should. LabelUpdate is updated every 3 seconds. Someone knows why they dont get deleted? :S
pawn Код:
public LabelUpdate()
{
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
        if(Gunvehicleslocked == 1)
        {
            if(GetVehicleModel(i) == 520 || GetVehicleModel(i) == 432 || GetVehicleModel(i) == 447)
            {
                new Float:tmpx, Float:tmpy, Float:tmpz; // Float.
                GetVehiclePos(i, tmpx, tmpy, tmpz); // Geting vehicle pos
                CarLabel[i] = Create3DTextLabel("Locked by an Admin", COLOR_DARKRED,tmpx,tmpy,tmpz,20,0,1); // Creating
                Attach3DTextLabelToVehicle(Text3D:CarLabel[i],i , 0, 0, 0); // Attaching
            }
        }
        if(Gunvehicleslocked == 0)
        {
            if(GetVehicleModel(i) == 520 || GetVehicleModel(i) == 432 || GetVehicleModel(i) == 447)
            {
                Delete3DTextLabel(CarLabel[i]);
            }
        }
    }
    return 1;
}
Reply
#2

Use Update3DTextLabelText before delete may work.

Код:
Update3DTextLabelText( CarLabel[ i ], 0xFFFFFFFF, "" );
Reply
#3

Tried that, they wont update.
Reply
#4

I fixed this by adding public DeleteLabel() function and putting Delete3DTextLabel there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)