Deleting a 3D text label
#1

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
Reply
#2

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]);
Reply
#3

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 -.-
Reply
#4

REPLY! :@
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)