Name changing - 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: Name changing (
/showthread.php?tid=200266)
Name changing -
marinov - 17.12.2010
Is there a way to keep the name of the server changing like random sentences or something like that ?
Re: Name changing -
admantis - 18.12.2010
Yes with a looping timer.
Re: Name changing -
marinov - 18.12.2010
can u make me a example? I never use timer so I don't know how to start.
Re: Name changing -
admantis - 18.12.2010
pawn Код:
public OnGameModeInit()
{
SetTimer("SetServerName",5000,1);//timer SetServerName, 5000 ms (5secs), looping true
pawn Код:
forward SetServerName
()public SetServerName
(){ switch(random(3)) // change this to the ammount of random names { // cases start with zero not with one case 0: SendRconCommand
("hostname TDM");
// hostname TDM sets the name to TDM case 1: SendRconCommand
("hostname DM War of nations");
case 2: SendRconCommand
("hostname www.tdm.com");
return 1;
}}
Re: Name changing -
marinov - 18.12.2010
Perfect, thx so much bro
Re: Name changing -
marinov - 18.12.2010
A few erros but I think I can fix