24.11.2011, 15:03
I am making something with Pickups and I need a little help.
I have 10 pickups
And I want OnFilterScriptExit()
to destroy all the pickups. But how can I do that, because on the variable I have [10] and I cannot do it like this.
I have 10 pickups
pawn Код:
new
Money_Collection[10];
pawn Код:
public OnFilterScriptInit()
{
Money_Collection[0] = CreatePickup(1276, 2, -416.6939, 1398.7, 25.5071);
Money_Collection[1] = CreatePickup(1276, 2, -465.1799, 1631.848, 3.4946);
Money_Collection[2] = CreatePickup(1276, 2, -588.3328, 2013.401, 9.2775);
Money_Collection[3] = CreatePickup(1276, 2, -29.741, 1434.613, 15.2435);
Money_Collection[4] = CreatePickup(1276, 2, 296.169, 1428.594, 33.8512);
Money_Collection[5] = CreatePickup(1276, 2, 187.2332, 1119.576, 11.7862);
Money_Collection[6] = CreatePickup(1276, 2, -236.4455, 774.1738, 31.7022);
Money_Collection[7] = CreatePickup(1276, 2, -553.7753, 798.212, 4.8487);
Money_Collection[8] = CreatePickup(1276, 2, -374.6487, 1118.784, 24.5878);
Money_Collection[9] = CreatePickup(1276, 2, -575.619, 1220.348, 23.8204);
// Rest Of Code
return 1;
}
to destroy all the pickups. But how can I do that, because on the variable I have [10] and I cannot do it like this.
pawn Код:
public OnFilterScriptExit()
{
DestroyPickup(Money_Collection);
return 1;
}