SA-MP Forums Archive
Timer - 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: Timer (/showthread.php?tid=87375)



Timer - yelkreb - 19.07.2009

Hey I am wondering how to create a working timer with SetTimer command, I need some lines when a player enters a my [ pickup1; ] then after 10 seconds will be gamemode restart. Thanks for the help in advance.


Re: Timer - wilcock33 - 19.07.2009

i dont think that is possible :S but you can make a GM retstart script very simply



















i dont know how, but its definatly possible


Re: Timer - Criss_Angel - 19.07.2009

Quote:
Originally Posted by yelkreb
Hey I am wondering how to create a working timer with SetTimer command, I need some lines when a player enters a my [ pickup1; ] then after 10 seconds will be gamemode restart. Thanks for the help in advance.
HHMMM why would you want the GM to restart after ten secs of being on pickup :S


Re: Timer - refshal - 19.07.2009

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if (pickupid == pickup1)
  {
    SetTimer("RestartGameMode", 10000, false);
  }
}

forward RestartGameMode();
public RestartGameMode()
{
  GameModeExit();
}



Re: Timer - yelkreb - 19.07.2009

Quote:
Originally Posted by еddy
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if (pickupid == pickup1)
  {
    SetTimer("RestartGameMode", 10000, false);
  }
}

forward RestartGameMode();
public RestartGameMode()
{
  GameModeExit();
}
Thank you, that's all I needed. I had 1000 instead of 10000 so I guess that was the problem why it didn't work in the first place.

@wilcock33 Yes it is possible, with SetTimer.

@Criss_Angel I am creating a new gamemode, maybe you will know it when I will release it.