30.12.2014, 21:57
(
Последний раз редактировалось Boot; 30.12.2014 в 22:36.
)
Thank you, same for you.
I will try to help you. As I see, you have a command which creates the pickups, so we can destroy them after 45 seconds.
I will try to help you. As I see, you have a command which creates the pickups, so we can destroy them after 45 seconds.
pawn Код:
// On top:
new Pickups[4]; // I just changed the variable names which we are going to use for now on.
CMD:robbery(playerid)
{
Pickups[0] = CreatePickup(1274, 1,1966.6005,1021.6895,992.4688, 1);
Pickups[1] = CreatePickup(1212, 1,1966.5988,1029.6251,992.4745,1);
Pickups[2] = CreatePickup(1212, 1,1966.5957,1013.9757,992.4688,1);
Pickups[3] = CreatePickup(1274, 1,1966.5984,1006.2905,992.4745, 1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Pickups[0] || pickupid == Pickups[1] || pickupid == Pickups[2] || pickupid == Pickups[3])
{
GivePlayerMoney(playerid, 1000);
DestroyPickup(pickupid);
SetTimer("DestroyPickups, 40000, false);
}
return 1;
}
forward DestroyPickups();
public DestroyPickups()
{
for(new i; i <= 4; i++)
{
DestroyPickup(Pickups[i]);
}
return 1;
}