Destroy pickup - 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)
+--- Thread: Destroy pickup (
/showthread.php?tid=410908)
Destroy pickup -
PapaSmerf - 27.01.2013
Hello,
I can't destroy pickup:
Код:
PickupInfo[home] = CreateDynamicPickup(1273, 1, myPos[0], myPos[1], myPos[2]);
DestroyDynamicPickup(PickupInfo[home]);
Re: Destroy pickup -
Threshold - 27.01.2013
Where are you setting and getting the value of 'home' from? The variable home is probably changing or is different at creation and deletion.
Re: Destroy pickup -
PapaSmerf - 27.01.2013
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)
Re: Destroy pickup -
Threshold - 27.01.2013
Show both commands/functions where you create and destroy the pickups in full. Also show me the defines for PickupInfo and home.
Re: Destroy pickup -
PapaSmerf - 27.01.2013
Код:
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]);
}
Re: Destroy pickup -
PapaSmerf - 27.01.2013
Please, help with this.
Re : Destroy pickup -
[HRD]Mar1 - 27.01.2013
Use timer