Server name change - 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 change (
/showthread.php?tid=462268)
Server name change -
dudefff - 06.09.2013
How to change the server name every 4 seconds? I saw that on a server and i want to do that
, if you can help me i will rep you
Re: Server name change -
Misiur - 06.09.2013
First result in ******:
https://sampforum.blast.hk/showthread.php?tid=206426
Re: Server name change -
XStormiest - 06.09.2013
That tutorial is wrong maked
that " don't have to be there
pawn Код:
format(str, sizeof(str), "hostname %s", HName1");
and also here
pawn Код:
format(str, sizeof(str), "hostname %s", HName2");
Just a little bit easy
pawn Код:
#include <a_samp>
#define S_NAME1 "Modify Here"
#define S_NAME 2 "Modify Here"
#define S_NAME 3 "Modufy Here"
#define TIMER_CHANGE 4000
public OnGameModeInit()
{
SetTimer("SetNameServer", TIMER_CHANGE , true);
return 1;
}
forward SetNameServer();
public SetNameServer()
{
new r = random(3)
switch(r)
{
case 0:
{
new str[128];
format(str, sizeof(str), "hostname %s", S_NAME1);
SendRconCommand(str);
}
case 1:
{
new str[128];
format(str, sizeof(str), "hostname %s", S_NAME1);
SendRconCommand(str);
}
case 2:
{
new str[128];
format(str, sizeof(str), "hostname %s", S_NAME1);
SendRconCommand(str);
}
}
}
Re: Server name change -
dudefff - 06.09.2013
I will try it out first then if it works i will +rep you
Re: Server name change -
dudefff - 06.09.2013
Error Expteced token in this
switch®
Re: Server name change -
Misiur - 06.09.2013
Missing semicolon
Re: Server name change -
Dragonsaurus - 06.09.2013
Must be:
I was so unfucused there... I wrote "switch®;"
Eh:
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 13 seconds.
Edit: LOL Misiur posted before me...
Re: Server name change -
dudefff - 06.09.2013
Fixed, I will test the system now if works = +repd
@Dragonsaurus
Wrong , I should fix new® = random; not switch® , btw thanks