Server name change - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Server name change (
/showthread.php?tid=206426)
Server name change -
Marty_Alex - 03.01.2011
Hi i just ask for some favor does anybody knows the code for changing server name like every 3 to 5 sec i saw this in a server and in Bloodz RP GM so ya thanks
Re: Server name change -
ExeC - 21.01.2011
At the top of your gamemode:
pawn Code:
#define HName1 "Hostname 1"
#define HName2 "Hostname 2"
Under OnGameModeInit:
pawn Code:
SetTimer("HNChange", 5000, 0);
At the bottom of your gamemode:
pawn Code:
forward HNChange();
public HNChange()
{
new str[128];
format(str, sizeof(str), "hostname %s", HName1");
SendRconCommand(str);
SetTimer("HNChange2", 5000, 0);
}
pawn Code:
forward HNChange2();
public HNChange2()
{
new str[128];
format(str, sizeof(str), "hostname %s", HName2");
SendRconCommand(str);
SetTimer("HNChange", 5000, 0);
}
(Dunno how old this topic was, because I was just searching something and found this...)
Re: Server name change -
Marty_Alex - 21.01.2011
Quote:
Originally Posted by ExeC
At the top of your gamemode:
pawn Code:
#define HName1 "Hostname 1" #define HName2 "Hostname 2"
Under OnGameModeInit:
pawn Code:
SetTimer("HNChange", 5000, 0);
At the bottom of your gamemode:
pawn Code:
forward HNChange(); public HNChange() { new str[128]; format(str, sizeof(str), "hostname %s", HName1"); SendRconCommand(str); SetTimer("HNChange2", 5000, 0); }
pawn Code:
forward HNChange2(); public HNChange2() { new str[128]; format(str, sizeof(str), "hostname %s", HName2"); SendRconCommand(str); SetTimer("HNChange", 5000, 0); }
(Dunno how old this topic was, because I was just searching something and found this...)
|
I dont care its old xD i waited for long thank you mate your the best to answer <3
Re: Server name change -
ExeC - 21.01.2011
Quote:
Originally Posted by Marty_Alex
I dont care its old xD i waited for long thank you mate your the best to answer <3
|
No problem mate. But.. You're banned.. again? Oh man