You can modify this one
-- but use ForceChangeLevel instead of ServerCommand
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
public Plugin:myinfo =
{
name = "SetDefaultMap",
author = "Raska",
description = "",
version = "0.1",
url = ""
}
new Handle:gh_Timer = INVALID_HANDLE;
public OnClientDisconnect_Post( client )
{
if( IsServerEmpty() )
{
if( gh_Timer != INVALID_HANDLE )
{
KillTimer( gh_Timer );
gh_Timer = INVALID_HANDLE;
}
gh_Timer = CreateTimer( 60.0, Timer_CheckStatus );
}
}
public Action:Timer_CheckStatus( Handle:timer, any:client )
{
if( IsServerEmpty() )
ServerCommand( "sm_map surf_10x_reloaded" );
gh_Timer = INVALID_HANDLE;
return Plugin_Continue;
}
IsServerEmpty()
{
return ( GetTeamClientCount( CS_TEAM_T ) == 0 && GetTeamClientCount( CS_TEAM_CT ) == 0 )
}
__________________