SA-MP Forums Archive
Automatic Hostname changer - 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: Automatic Hostname changer (/showthread.php?tid=91221)



Automatic Hostname changer - Headyheadster - 13.08.2009

Where can i find Automatic Hostname and map changer for sa-mp server ?!!

For example i wanna , that 5 mins Hostname in russian language and map in russian, next 5 mins it changes and hostname in english and map name in english, please, if somebody knows how to do it , type here.


Re: Automatic Hostname changer - Doppeyy - 13.08.2009

For the love of god SEARCH.

/Artix


Re: Automatic Hostname changer - James_Alex - 13.08.2009

try this
pawn Код:
// put this in the top of the script
new sName;
// put this in OnGameModeInit
SetTimer("ChangeServer", 300000, true);

public ChangeServer()
{
if(sName == 1)
{
SendRconCommand("hostname Russian name");
SebdRconCommand("mapname Russian map");
sName = 2;
return 1;
}
else if(sName == 2)
{
SendRconCommand("hostname English name");
SebdRconCommand("mapname English map");
sName = 1;
}
return 1;
}



Re: Automatic Hostname changer - [TouchX]Ash - 13.08.2009

Quote:
Originally Posted by ► James_Alex
try this
pawn Код:
// put this in the top of the script
new sName;
// put this in OnGameModeInit
SetTimer("ChangeServer", 300000, true);

public ChangeServer()
{
if(sName == 1)
{
SendRconCommand("hostname Russian name");
SebdRconCommand("mapname Russian map");
sName = 2;
return 1;
}
else if(sName == 2)
{
SendRconCommand("hostname English name");
SebdRconCommand("mapname English map");
sName = 1;
}
return 1;
}
You've put SebdRconCommand, were you meant to? :P


Re: Automatic Hostname changer - Headyheadster - 09.09.2009

C:\Users\mushroom\Desktop\SAMP Dedicated Server\gamemodes\MOD.pwn(2160) : warning 235: public function lacks forward declaration (symbol "ChangeServer")
C:\Users\mushroom\Desktop\SAMP Dedicated Server\gamemodes\MOD.pwn(2164) : error 037: invalid string (possibly non-terminated string)
C:\Users\mushroom\Desktop\SAMP Dedicated Server\gamemodes\MOD.pwn(2164) : error 017: undefined symbol "mapname"
C:\Users\mushroom\Desktop\SAMP Dedicated Server\gamemodes\MOD.pwn(2164) : error 029: invalid expression, assumed zero
C:\Users\mushroom\Desktop\SAMP Dedicated Server\gamemodes\MOD.pwn(2164) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: Automatic Hostname changer - [mad]MLK - 09.09.2009

forward ChangeServer;

(Go's at the top)


Re: Automatic Hostname changer - Headyheadster - 09.09.2009

C:\Users\mushroom\Desktop\SAMP Dedicated Server\gamemodes\GWRUS9.pwn(176) : error 029: invalid expression, assumed zero
C:\Users\mushroom\Desktop\SAMP Dedicated Server\gamemodes\GWRUS9.pwn(176) : error 004: function "ChangeServer" is not implemented
C:\Users\mushroom\Desktop\SAMP Dedicated Server\gamemodes\GWRUS9.pwn(19 : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Automatic Hostname changer - dice7 - 09.09.2009

forward ChangeServer();