SA-MP Forums Archive
Server change name - 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: Server change name (/showthread.php?tid=504158)



Server change name - TrinityGamingRoleplay - 02.04.2014

Hey guys so i have seen servers chaning name all AUTO so i would like to get to know how do they do that like change the name from Trinity Gaming RP [0.3z] then Trinity Gaming Roleplay Refunding or something like that


Re: Server change name - BroZeus - 02.04.2014

this can be done by editing server.cfg file , by help of this line
Код:
hostname YOUR SERVERNAME HERE



Re: Server change name - Bingo - 02.04.2014

Код:
 new AutoName;//global variable
Then, Add this under GameModeInit.
Код:
 SetTimer("changehost", 3000,1); // it will change the server name after every 3 seconds
Now, Add this under GameModeInit.
Код:
forward changehost();
public changehost()
{
switch(AutoName)
{
case 0:
{
SendRconCommand("hostname Trinity RP 1");
 AutoName++
}
case 1:
{
SendRconCommand("hostname Trinity RP 2");
 AutoName++
}
case 2:
{
SendRconCommand("hostname Trinity RP 3");
 AutoName = 0;
}
}
 return 1;
  }
REP if worked.


Re: Server change name - KrYpToN98 - 02.04.2014

I wanted the same thing but failed
I couldnt even make it with your cmd


Re: Server change name - Bingo - 02.04.2014

Quote:
Originally Posted by KrYpToN98
Посмотреть сообщение
I wanted the same thing but failed
I couldnt even make it with your cmd
Try mine, It should/must work, If you did correctly not just CTRL+C and CTRL+V anywhere in gamemode.


Re: Server change name - TrinityGamingRoleplay - 02.04.2014

Thanks i did rep you! it did work