Destroy pickup
#1

Hello,
I can't destroy pickup:

Код:
PickupInfo[home] = CreateDynamicPickup(1273, 1, myPos[0], myPos[1], myPos[2]);
DestroyDynamicPickup(PickupInfo[home]);
Reply
#2

Where are you setting and getting the value of 'home' from? The variable home is probably changing or is different at creation and deletion.
Reply
#3

At the top of the gamemode i have a varibale new home; and when i create Pickup i use "home++" and when i destroy pickup i use home. This variable doesn't change becouse i use printf. When i use printf for "PickupInfo[home]" the text is empty (on console)
Reply
#4

Show both commands/functions where you create and destroy the pickups in full. Also show me the defines for PickupInfo and home.
Reply
#5

Код:
			if(!hActive[home])
			{
				
				PickupInfo[home] = CreateDynamicPickup(1273, 1, hEnterX[home], hEnterY[home], hEnterZ[home]);
				MapIcon[home] = CreateDynamicMapIcon(hEnterX[home], hEnterY[home], hEnterZ[home], 31, -1);
				
				format(Query, sizeof(Query), "UPDATE `Houses` SET `Active` = '1'  WHERE `UID` = '%d'", strval(inputtext));
				mysql_query(Query);

				home++;
			}
			else
			{
				format(Query, sizeof(Query), "UPDATE `Houses` SET `Active` = '0'  WHERE `UID` = '%d'", strval(inputtext));
				mysql_query(Query);

				DestroyDynamicPickup(PickupInfo[home]);
				DestroyDynamicMapIcon(MapIcon[home]);
			}
Reply
#6

Please, help with this.
Reply
#7

Use timer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)