SA-MP Forums Archive
Deleting a 3D text label - 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: Deleting a 3D text label (/showthread.php?tid=264939)



Deleting a 3D text label - thimo - 28.06.2011

Well i was creating text label for a owned car and it works fine but... If someone logs off and someone get on again and have same vehicle id you will get 2 names... But i cant get it fixed... This is my code:
Creating 3D label gets created when someone logs on and the cars get created
Код:
		format(string, sizeof(string), "Vehicle owned by: %s", AHouseData[HouseID][Owner]);
		Car3DText = Create3DTextLabel(string,0xAA3333AA,0,0,0,100.0,0);
		Attach3DTextLabelToVehicle(Car3DText, vid, 0,0,0);
OnPlayerDisconnect:
Код:
	Delete3DTextLabel(Car3DText);
But it doesnt get deleted when someone leaves server. Can anyone help? :S


Re: Deleting a 3D text label - Laronic - 28.06.2011

pawn Код:
new Car3DText[MAX_VEHICLES];


format(string, sizeof(string), "Vehicle owned by: %s", AHouseData[HouseID][Owner]);
Car3DText[vehicleid] = Create3DTextLabel(string,0xAA3333AA,0,0,0,100.0,0);
Attach3DTextLabelToVehicle(Car3DText[vehicleid], vehicleid, 0,0,0);


Delete3DTextLabel(Car3DText[vehicleid]);



Re: Deleting a 3D text label - thimo - 28.06.2011

C:\Users\Thimo\Desktop\Mappen\Samp 2\Backup\pawno\include\PPC_Housing.inc(244) : warning 213: tag mismatch
C:\Users\Thimo\Desktop\Mappen\Samp 2\Backup\pawno\include\PPC_Housing.inc(245) : warning 213: tag mismatch
C:\Users\Thimo\Desktop\Mappen\Samp 2\Backup\pawno\include\PPC_Housing.inc(294) : warning 202: number of arguments does not match definition
C:\Users\Thimo\Desktop\Mappen\Samp 2\Backup\pawno\include\PPC_FileOperations.inc(442) : warning 202: number of arguments does not match definition
C:\Users\Thimo\Desktop\Mappen\Samp 2\Backup\pawno\include\PPC_Dialogs.inc(1564) : warning 202: number of arguments does not match definition
C:\Users\Thimo\Desktop\Mappen\Samp 2\Backup\gamemodes\PPC_Trucking.pwn(291) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.

243 format(string, sizeof(string), "Vehicle owned by: %s", AHouseData[HouseID][Owner]);
244 Car3DText[playerid] = Create3DTextLabel(string,0xAA3333AA,0,0,0,100.0,0) ;
245 Attach3DTextLabelToVehicle(Car3DText[playerid], vid, 0,0,0);

i cant use [playerid] in there because its not defined in the header
But if i define it i get even more shit -.-


Re: Deleting a 3D text label - thimo - 29.06.2011

REPLY! :@