How to add map+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)
+--- Thread: How to add map+timer? (
/showthread.php?tid=415039)
How to add map+timer? -
[SWE]Anonymous - 11.02.2013
Hello...
Im back to learn abit of script again.
And i wounder how i add another map and a map timer for the map to switch to the 2:nd map?
Re: How to add map+timer? -
Da_Noob - 11.02.2013
Make a function that changes the map. Something like this:
pawn Код:
public MapChange()
{
SendClientMessageToAll(-1, "Map is changing...");
// Do something else here
return 1;
}
And under OnGameModeInit:
pawn Код:
SetTimer("MapChange",10*60000, 1); // 10*60000 means 1 mapround is 10 minutes, the 1 at the back is there so that the timer repeats itself after 10 minutes
Re: How to add map+timer? -
[SWE]Anonymous - 11.02.2013
Quote:
Originally Posted by Da_Noob
Make a function that changes the map. Something like this:
pawn Код:
public MapChange() { SendClientMessageToAll(-1, "Map is changing..."); // Do something else here return 1; }
And under OnGameModeInit:
pawn Код:
SetTimer("MapChange",10*60000, 1); // 10*60000 means 1 mapround is 10 minutes, the 1 at the back is there so that the timer repeats itself after 10 minutes
|
Thanks.
Gonna try this.