Quote:
Originally Posted by little_froy
use a global or static(in change map function) bool value to save and check the state.
for example, it's false default, after the map change, set it to true. next time check if the value is true, just do nothing.
|
true, done here:
Code:
#include <sourcemod>
#pragma semicolon 1
#pragma newdecls required
bool haschanged;
public void OnPluginStart()
{
CreateTimer(30.0, change, _, TIMER_FLAG_NO_MAPCHANGE);
}
public Action change(Handle timer)
{
if(!haschanged)
{
char buffer[128];
GetCurrentMap(buffer, 128);
haschanged = true;
ForceChangeLevel(buffer, "Reloading maps to load tiers.");
}
}
thanks