27.05.2012, 20:16
Well you need two things to destroy and make it respawn in 5 minutes:
and
So something like this:
pawn Code:
SetTimerEx("PickupRespawn", 300000, false);
pawn Code:
DestroyPickup(pickupone);
pawn Code:
forward PickupRespawn;
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickupone)
{
DestroyPickup(pickupone);
SendClientMessage(playerid, COLOR_WHITE, "You picked me up!");
SetTimerEx("PickupRespawn", 300000, false);
return 1;
}
return 1;
}
public PickupRespawn()
{
pickupone = CreatePickup(1318, 23, 0, 0, 0, 0);
return 1;
}