SA-MP Forums Archive
server 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 name (/showthread.php?tid=315179)



server name - Tanush123 - 02.02.2012

This might be a noob question, well i forgot how to do this so can people remind me. How do i make multi server names "Hostname"


Re: server name - Steven82 - 02.02.2012

Make some defines.

pawn Код:
#define HOSTNAME1 "hostname host-1"
#define HOSTNAME2 "hostname host-2"
#define HOSTNAME3 "hostname host-3"
// etc
Then create some callbacks and a timer and every and change the hostname every 10 seconds.

pawn Код:
forward Hostname1();
public Hostname1()
{
 SetTimer("Hostname2", 10000, 0);
 return 1;
}

forward Hostname2();
public Hostname2()
{
 SendRconCommand(HOSTNAME2);
 SetTimer("Hostname3", 10000, 0);
 return 1;
}



Re: server name - Tanush123 - 02.02.2012

ok thanks