SA-MP Forums Archive
Delete3DTextLabel dosent delete it - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Delete3DTextLabel dosent delete it (/showthread.php?tid=247855)



Delete3DTextLabel dosent delete it - Richie - 11.04.2011

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



Re: Delete3DTextLabel dosent delete it - Retardedwolf - 11.04.2011

Use Update3DTextLabelText before delete may work.

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



Re: Delete3DTextLabel dosent delete it - Richie - 11.04.2011

Tried that, they wont update.


Re: Delete3DTextLabel dosent delete it - Richie - 11.04.2011

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