Help with OnPlayerPickUpPickup
#1

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.
Reply
#2

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.
Reply
#3

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?
Reply
#4

Maybe

OnPlayerPickUpPickup ->

Код:
DestroyPickup(pickup);
SetTimer("Pickup",time in milliseconds,0);
Код:
forward Pickup();
public Pickup()
{
CreatePickup
return 1;
}
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)