11.04.2011, 01:23
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;
}