SA-MP Forums Archive
Pickup that respawn every 5 minutes - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pickup that respawn every 5 minutes (/showthread.php?tid=260184)



Pickup that respawn every 5 minutes - Face9000 - 07.06.2011

Hi guys,i want create a pickup that respawns every 5 minute.

Ex: Player1 takes pickup => "You have picked a pickup,come after 5 minutes to pickup it again!" => 5 minutes passed => Respawn.

Thanks.


Re: Pickup that respawn every 5 minutes - *IsBack - 07.06.2011

OnPlayerPickUpPickup callback:
pawn Код:
if(pickupid == YOURPICKUP)
{
     DestroyPickup(YOURPICKUP);
     SetTimer("CreatePk",1000*60*5,0);
}

//NOT in the callback:
forward CreatePk();
public CreatePk()
{
     YOURPICKUP = CreatePickup() //your pickup here
}



Re: Pickup that respawn every 5 minutes - Face9000 - 07.06.2011

Thanks ^^