Jump to content
  • 0

Comanda ! Schimbare nume server


sTk.

Question

4 answers to this question

Recommended Posts

Poti pune eventual hostnamechange in gm sa ti'l schimbe la o anumita perioada de timp

forward ChangeHostname();
la OnGameModeInit
SetTimer("ChangeHostname",1000,1);
sau la cat timp vrei tu
public ChangeHostname()
{
     new var = random(4);
     switch (var)
     {
         case 0: SendRconCommand("hostname Nume");
         case 2: SendRconCommand("hostname Nume");
         case 3: SendRconCommand("hostname Nume");
         case 4: SendRconCommand("hostname Nume");

     }
}

Link to comment
Share on other sites

Poti pune eventual hostnamechange in gm sa ti'l schimbe la o anumita perioada de timp

forward ChangeHostname();
la OnGameModeInit
SetTimer("ChangeHostname",1000,1);
sau la cat timp vrei tu
public ChangeHostname()
{
     new var = random(4);
     switch (var)
     {
         case 0: SendRconCommand("hostname Nume");
         case 2: SendRconCommand("hostname Nume");
         case 3: SendRconCommand("hostname Nume");
         case 4: SendRconCommand("hostname Nume");

     }
}
    Explicatii :
SetTimer("ChangeHostname",1000,1);
->> "1000" este timpul,daca nu ma insel in MiliSecunde,deci 1000=1secunda. Aceasta valoare poti sa o schimbi cum vrei tu.                
random(4);

->> Numarul 4 este numarul de cazuri sau aici numarul HostName-urilor. Deci,daca vrei ca scriptul sa aleaga doar din 3 cazuri atunci schimbi (4) cu (3) si stergi [pawn]case 4: SendRconCommand("hostname Nume");[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.