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



Hostname - Gregory00 - 17.12.2013

How can I make the hostname changes every 5 seconds? Should I edit something in the server.cfg or smth?

Also..I have this for the hostname..
Код:
	format(servergmtextstr, 64, "hostname ..:: Voltage Gaming Roleplay ::.. [WizardingSAMP]", SERVER_GM_TEXT); // DO NOT REMOVE THIS



Re: Hostname - Blademaster680 - 17.12.2013

https://sampforum.blast.hk/showthread.php?tid=273353 Hope this helps you


Re: Hostname - Gregory00 - 17.12.2013

Nah..I tried it but it doesnt work


Re: Hostname - Blademaster680 - 17.12.2013

Uhmmm try putting it into your gamemode? maybe your gamemode is setting your gametext and it is conflicting with the FS


Re: Hostname - Gregory00 - 18.12.2013

How?


Re : Hostname - [HRD]Mar1 - 18.12.2013

Forward :
Код:
forward HostNameChanger();
Add this in your OnGameModeInit
Код:
SetTimer("HostNameChanger",5000,1);
And this as a public


Код:
public HostNameChanger()
{
   new variable = random(2); //(Change the 3 to a different number if you are adding more message or deleting)
   switch (variable)
   {
     case 0: SendRconCommand("hostname Message 1"); // << Don't delete the hostname 
     case 1: SendRconCommand("hostname Message 2"); // << Don't delete the hostname 
   }
}