Server name
#1

How to make my server name changes? like - [0.3x]Razer Gaming Roleplay - then after 3-5 seconds it will be - [0.3x l ENG] RGRP is currently hiring - or something like that then after 3-5 seconds again it will be back to the first one, I saw some server with their names blinking or changing. but how?
Reply
#2

You'll need to make a timer in OnGameModeInit, have you even tried to use "search"?

There are tons of threads like this, and many tutorials and scripts. :/
Reply
#3

try this

pawn Код:
new ServerNameLast = 1;

public OnGameModeInit()
{
     SetTimer("UpdateServerName",5000,1);
     return 1;
}
forward UpdateServerName();
public UpdateServerName()
{
      if(ServerNameLast == 1)
      {
            SendRconCommand("hostname [0.3x]Razer Gaming Roleplay");
            ServerNameLast++;
      }
      if(ServerNameLast == 2)
      {
            SendRconcommand("hostname [0.3x l ENG] RGRP is currently hiring");
            ServerNameLast = 1;
      }
      return 1;
}
EDIT: you can extend it too... like you need to extend the " if " statement like

pawn Код:
new ServerNameLast = 1;

public OnGameModeInit()
{
     SetTimer("UpdateServerName",5000,1);
     return 1;
}
forward UpdateServerName();
public UpdateServerName()
{
      if(ServerNameLast == 1)
      {
            SendRconCommand("hostname [0.3x]Razer Gaming Roleplay");
            ServerNameLast++;
      }
      if(ServerNameLast == 2)
      {
            SendRconCommand("hostname [0.3x l ENG] RGRP is currently hiring");
            ServerNameLast++;
      }
      if(ServerNameLast == 3)
      {
            SendRconCommand("hostname new hostname which you want to display");
            ServerNameLast = 1;
      }
      return 1;
}
just set the "ServerNameLast" var to 1 so that the loop continues setting the hostname again and again...

And increment it whenever the hostname arent the last to display..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)