19.03.2010, 04:49
You made a mistake in 1 of your timers, and made your code smaller:
Update: http://sa-mp.com.pastebin.com/CNw3jdfQ
Update: http://sa-mp.com.pastebin.com/CNw3jdfQ
pawn Code:
#include <a_samp>
#define FILTERSCRIPT
//
forward mapname(); forward mapname2(); forward hostname(); forward hostname2();
//
#define mapnamechangetime 3000 // Change "3000" to the value how often the mapname is changed, 1000 = 1 second
#define hostnamechangetime 3000 // Change "3000" to the value how often the hostname is changed, 1000 = 1 second
//
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Advanced mapname and hostname changer ");
print(" By Mo3 aka TheFailFactor");
print("--------------------------------------\n");
SetTimer("mapname", 3000, 0);
SetTimer("hostname", 3000, 0);
return 1;
}
/* --- map name 1 --- */
public mapname() { SendRconCommand("mapname MAPNAME #1"); return SetTimer("mapname2", mapnamechangetime, 0); }
/* --- map name 2 --- */
public mapname2(){ SendRconCommand("mapname MAPNAME #2"); return SetTimer("mapname", mapnamechangetime, 0); }
/* --- host name --- */
public hostname(){ SendRconCommand("hostname HOSTNAME #1"); return SetTimer("hostname2", hostnamechangetime, 0); }
/* --- host name 2 --- */
public hostname2(){ SendRconCommand("hostname HOSTNAME #2"); return SetTimer("hostname", hostnamechangetime, 0); }