Delete3DTextLabel doesn't work - 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 doesn't work (
/showthread.php?tid=143349)
Delete3DTextLabel doesn't work -
ziomal432 - 22.04.2010
I've got this code:
Код:
public OnVehicleSpawn(vehicleid)
{
Delete3DTextLabel(Text3D:VehicleData[vehicleid][LockedLabelID]);
VehicleData[vehicleid][LockedLabelID] = -1;
printf("OnVehicleSpawn(vehicleid = %d)", vehicleid);
return 1;
}
Console showed
Quote:
OnVehicleSpawn(vehicleid = 102)
|
, but the 3D Text still exists
I added:
Код:
printf("%d", VehicleData[vehicleid][LockedLabelID]);
, console showed
.
Creating code:
Код:
VehicleData[vehicleid][LockedLabelID] = _:Create3DTextLabel("No fuel", 0xDDB950FF, 0.0, 0.0, 0.0, 30.0, 0);
Attach3DTextLabelToVehicle(Text3D:VehicleData[vehicleid][LockedLabelID], vehicleid, 0.0, 0.0, 1.0);
Any ideas?
Re: Delete3DTextLabel doesn't work - WackoX - 22.04.2010
What's up with the _: before the Create3DTextLabel? delete that part.
Re: Delete3DTextLabel doesn't work - WackoX - 22.04.2010
Also this code is wrong:
Код:
Attach3DTextLabelToVehicle(Text3D:VehicleData[vehicleid][LockedLabelID], vehicleid, 0.0, 0.0, 1.0);
You have to use:
Код:
new Text3D:VehicleData[vehicleid][LockedLabelID];
when you create it.
Re: Delete3DTextLabel doesn't work -
ziomal432 - 22.04.2010
PAWN doesn't have arrays types. These Float:, Text3D: are only for remove tag mismatch warning, _: changes them to normal, without tag (if we've got an array without "tag" and want to save a value which is tagged, we need to use _: ).
I changed it and didn't helped.
EDIT:
I changed the line to:
Код:
printf("%d", Delete3DTextLabel(VehicleData[vehicleid][LockedLabelID]));
Console showed 1
Re: Delete3DTextLabel doesn't work -
ziomal432 - 23.04.2010
EDIT:
Dunno why, but it fixed itself....