Help with OnPlayerPickUpPickup - 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: Help with OnPlayerPickUpPickup (
/showthread.php?tid=148574)
Help with OnPlayerPickUpPickup -
ViruZZzZ_ChiLLL - 17.05.2010
Okay, so basically I need help with OnPlayerPickUpPickup.
I just created a small
spaced map, and it get's
irritating when a lot of people enter in the small
spaced
map
via command, so how can I make sure the OnPlayerPickUpPickup, a timer
will go off and make sure no one can enter it until the time has
ended.
Re: Help with OnPlayerPickUpPickup -
luigifan9 - 17.05.2010
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Okay, so basically I need help with OnPlayerPickUpPickup.
I just created a small spaced map, and it get's
irritating when a lot of people enter in the small spaced
map via command, so how can I make sure the OnPlayerPickUpPickup, a timer
will go off and make sure no one can enter it until the time has
ended.
|
Use two timers. The first timer destroyes the pickup and then sets another timer that will create it in X seconds.
Re: Help with OnPlayerPickUpPickup -
ViruZZzZ_ChiLLL - 18.05.2010
Quote:
Originally Posted by luigifan9
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Okay, so basically I need help with OnPlayerPickUpPickup.
I just created a small spaced map, and it get's
irritating when a lot of people enter in the small spaced
map via command, so how can I make sure the OnPlayerPickUpPickup, a timer
will go off and make sure no one can enter it until the time has
ended.
|
Use two timers. The first timer destroyes the pickup and then sets another timer that will create it in X seconds.
|
Okay, I get what your saying, but I'm a noob at timers

Currently getting a hang of it though

can someone help?
Re: Help with OnPlayerPickUpPickup -
Assyria - 18.05.2010
Maybe
OnPlayerPickUpPickup ->
Код:
DestroyPickup(pickup);
SetTimer("Pickup",time in milliseconds,0);
Код:
forward Pickup();
public Pickup()
{
CreatePickup
return 1;
}
Re: Help with OnPlayerPickUpPickup -
Sergei - 18.05.2010
pawn Код:
new bool:gCanPickup;
public OnPlayerPickUpPickup(playerid, pickupid)
{
if((pickupid == SOME_PIKCUP) && gCanPickup)
{
//execute
}
return 1;
}
public ChangePickupState(bool:whatto)
{
gCanPickup = whatto;
return;
}
SetTimerEx("ChangePickupState",1337,false,"i",true);
SetTimerEx("ChangePickupState",1337,false,"i",false);
Can also be made with states (automata) if you are fimilar with them.