25.06.2011, 09:53
Hi i want my hostname change every 1 min i made the timer and forwarded it but i cant find the right function to change it if you know it please tell me and if it with file functions please tell me how to do it ?
//ongamemodeinit
SetTimer("GMname", 60000, true); // Makes a timer that repeats every minute
forward GMname() // forwards the timer
public GMname()
{
new rand = random(5); // gets a random number
switch(rand) // switches through the numbers
{
case 0: SetGameModeText("Las Venturas: a"); // if random == 0, then GMname is this
case 1: SetGameModeText("Las Venturas: b"); // if random == 1, then GMname is this
case 2: SetGameModeText("Las Venturas: c"); // etc
case 3: SetGameModeText("Las Venturas: d"); // etc
case 4: SetGameModeText("Las Venturas: e"); // etc
cas3 5: SetGameModeText("Las Venturas: f"); // etc
}
return 1;
}
cas3 5: SetGameModeText("Las Venturas: f"); // etc
case 5: SetGameModeText("Las Venturas: f");
SendRconCommand("hostname My hostname here");
#include <a_samp> #define FILTERSCRIPT forward hostname(); forward hostname2(); #define hostnamechangetime 3000 // Change "3000" to the value how often the hostname is changed, 1000 = 1 second //---------------------------------------------------------------------------- public OnFilterScriptInit() { print("\n--------------------------------------"); print("AutoHostname"); print("--------------------------------------\n"); SetTimer("hostname", 3000, 0);/settimer 3000,to 1000 = 1 second return 1; } //---------------------------------------------------------------------------- public hostname() { SendRconCommand("hostname verision 1.6");//modify the name server don't remove hostname SetTimer("hostname", hostnamechangetime, 0);//settimer hostname return 1; } public hostname2() { SendRconCommand("hostname lets go counter strike ");//modify the name server don't remove hostname SetTimer("hostname2", hostnamechangetime, 0);//settimer hostname2 return 1; }