stock any:{FunctionName}(any:val=0, String:...)
{
	if(val > 0)
	{
		return val;
	}

	if(!FileExists("{DebuggerIdentifier}.running.bpdebug"))
	{
		return val;
	}
	
	if(FileExists("{IndentifierGUID}.ignore.bpdebug"))
	{
		return val;
	}
	
	new Handle:hTriggerFile;
	while((hTriggerFile = OpenFile("{IndentifierGUID}.trigger.bpdebug", "w")) == INVALID_HANDLE) {}
	
	WriteFileLine(hTriggerFile, "i:%d", val);
	WriteFileLine(hTriggerFile, "f:%f", val);
	FlushFile(hTriggerFile);
	CloseHandle(hTriggerFile);
	
	for(;;)
	{
		if(!FileExists("{DebuggerIdentifier}.running.bpdebug"))
		{
			break;
		}
		
		if(FileExists("{IndentifierGUID}.continue.bpdebug"))
		{
			DeleteFile("{IndentifierGUID}.continue.bpdebug"); 
			DeleteFile("{IndentifierGUID}.continuee.bpdebug");
			DeleteFile("{IndentifierGUID}.continuef.bpdebug");
			break;
		}
		
		if(FileExists("{IndentifierGUID}.continuee.bpdebug"))
		{
			DeleteFile("{IndentifierGUID}.continue.bpdebug"); 
			DeleteFile("{IndentifierGUID}.continuee.bpdebug");
			DeleteFile("{IndentifierGUID}.continuef.bpdebug");
			
			ThrowError("BasicPawn Debugger Assert action: Abort");
			break;
		}
		
		if(FileExists("{IndentifierGUID}.continuef.bpdebug"))
		{
			DeleteFile("{IndentifierGUID}.continue.bpdebug"); 
			DeleteFile("{IndentifierGUID}.continuee.bpdebug");
			DeleteFile("{IndentifierGUID}.continuef.bpdebug");
			
			SetFailState("BasicPawn Debugger Assert action: Fail");
			break;
		}
	}
	
	return val;
}