Changing Maps? - 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: Changing Maps? (
/showthread.php?tid=179702)
Changing Maps? -
<Weponz> - 28.09.2010
How can i make my GM Have 2 maps on the 1 GM but each map has diffrent spawn points and the maps change with a timer? Basically like the CCS Server but IDK if thay do it with a command..Any help?
Re: Changing Maps? -
Desert - 28.09.2010
The simple way to do that is to make copy(copies) of your script, and change the spawn co-ordinates. Then add a timer to each of the scripts that will change gamemode when time is over.
Or you can make a global variable, which OnPlayerSpawn checks, and the spawns the players on specific co-ords depending on the variable. Then change the variable by a timer
Re: Changing Maps? -
miokie - 28.09.2010
Quote:
Originally Posted by Desert
Or you can make a global variable, which OnPlayerSpawn checks, and the spawns the players on specific co-ords depending on the variable. Then change the variable by a timer
|
pawn Код:
new Area[3];
new Float:Area1Spawn[3][3] =
{
{x,y,z},
{x,y,z},
{x,y,z},
};
new Float:Area2Spawn[3][3] =
{
{x,y,z},
{x,y,z},
{x,y,z},
};
new Float:Area3Spawn[3][3] =
{
{x,y,z},
{x,y,z},
{x,y,z},
};
OnPlayerSpawn
pawn Код:
if(Area[0] == 1)
{
new rand = sizeof(Area1Spawn);
SetPlayerPos(playerid,Area1Spawn[rand][0],Area1Spawn[rand][1],Area1Spawn[rand][2]);
}
if(Area[1] == 1)
{
new rand = sizeof(Area2Spawn);
SetPlayerPos(playerid,Area2Spawn[rand][0],Area2Spawn[rand][1],Area2Spawn[rand][2]);
}
if(Area[2] == 1)
{
new rand = sizeof(Area3Spawn);
SetPlayerPos(playerid,Area3Spawn[rand][0],Area3Spawn[rand][1],Area3Spawn[rand][2]);
}
Something like that. I guess...
Re: Changing Maps? -
<Weponz> - 28.09.2010
if i make the copies of the gm and change spawn co-ords how i make the timer to change GM's and do i change my CFG to Gamemode(1) GM 1 GM 2
?
Re: Changing Maps? -
sekol - 28.09.2010
/rcon changemode [mode]
or
SendRconCommand("changemode <YOURGMHERE>"); wihtout "< and >"