SA-MP Forums Archive
can you set the server name in the game mode - 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: can you set the server name in the game mode (/showthread.php?tid=148461)



can you set the server name in the game mode - johnathon956 - 17.05.2010

is this possible or not


Re: can you set the server name in the game mode - shady91 - 17.05.2010

Quote:
Originally Posted by johnathon956
is this possible or not
Do you mean change the server name while in game?


Re: can you set the server name in the game mode - DJDhan - 17.05.2010

Quote:
Originally Posted by Shady91
Quote:
Originally Posted by johnathon956
is this possible or not
Do you mean change the server name while in game?
He means changing the server name from the gamemode script using pwn script.

No, that's only from the server.cfg. the only thing you can set is the Mode and Map.


Re: can you set the server name in the game mode - shady91 - 17.05.2010

Quote:
Originally Posted by DJDhan
Quote:
Originally Posted by Shady91
Quote:
Originally Posted by johnathon956
is this possible or not
Do you mean change the server name while in game?
He means changing the server name from the gamemode script using pwn script.

No, that's only from the server.cfg. the only thing you can set is the Mode and Map.
You can change the server name using pawn.


Re: can you set the server name in the game mode - DJDhan - 17.05.2010

By editing server.cfg using pawn?


Re: can you set the server name in the game mode - Fj0rtizFredde - 17.05.2010

pawn Code:
SendRconCommand("hostname NAMEHERE");
Simple



Re: can you set the server name in the game mode - Thrarod - 17.05.2010

I was gonna say that Or just login to rcon then /rcon hostname OMGLOLOLOL


Re: can you set the server name in the game mode - johnathon956 - 17.05.2010

lol i was thinking something like

pawn Code:
#define hostname        "=AS="
#define     mapname         "=AS="
#define     modename        "=AS="
#define     website         "=AS=.com"



Re: can you set the server name in the game mode - Fj0rtizFredde - 17.05.2010

Quote:
Originally Posted by johnathon956
lol i was thinking something like

pawn Code:
#define hostname        "=AS="
#define     mapname         "=AS="
#define     modename        "=AS="
#define     website         "=AS=.com"
I think you can only do this then:
pawn Code:
#define modename "My IceCream" //On the top

//OnGameModeInit
SetGameModeText(modename); //Set's the mode of the gm :)
For the other stuff I think you need to use SendRconCommand


Re: can you set the server name in the game mode - iJumbo - 17.05.2010

this change the server name every 2 second +- ::D
Code:
new changename = 1;
forward CHANGE();

public OnFilterScriptInit()
{
   SetTimer("CHANGE", 2000, 1);
}

public CHANGE()
{
	if(changename == 1)
 	{
 		changename = 2;
  	SendRconCommand("hostname servername 1");
   	return 1;
  }
	else if(changename == 2)
 	{
 		changename = 3;
  	SendRconCommand("hostname server name 2");
  	return 1;
  }
  else if(changename == 3)
  {
  	changename = 1;
   	SendRconCommand("hostname servername 3");
   	return 1;
  }
  return 1;
}