diff --git a/AutoRecorder/scripting/AutoRecorder.sp b/AutoRecorder/scripting/AutoRecorder.sp index 46fbe938..c95d5aaf 100644 --- a/AutoRecorder/scripting/AutoRecorder.sp +++ b/AutoRecorder/scripting/AutoRecorder.sp @@ -32,6 +32,8 @@ public Plugin myinfo = public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) { + CreateNative("IsDemoRecording", Native_IsDemoRecording); + CreateNative("GetDemoRecordingNumber", Native_GetDemoRecordingNumber); CreateNative("GetDemoRecordingTick", Native_GetDemoRecordingTick); @@ -236,6 +238,11 @@ void StopRecord() } } +public int Native_IsDemoRecording(Handle hPlugin, int numParams) +{ + return g_bIsRecording; +} + public int Native_GetDemoRecordingNumber(Handle hPlugin, int numParams) { return g_iRecordingNumber; diff --git a/AutoRecorder/scripting/include/AutoRecorder.inc b/AutoRecorder/scripting/include/AutoRecorder.inc index 40adbe2c..870fabfc 100644 --- a/AutoRecorder/scripting/include/AutoRecorder.inc +++ b/AutoRecorder/scripting/include/AutoRecorder.inc @@ -3,6 +3,8 @@ #endif #define AutoRecorder_included +native bool IsDemoRecording(); + native int GetDemoRecordingNumber(); native int GetDemoRecordingTick(); @@ -20,6 +22,7 @@ public SharedPlugin __pl_AutoRecorder = #if !defined REQUIRE_PLUGIN public void __pl_AutoRecorder_SetNTVOptional() { + MarkNativeAsOptional("IsDemoRecording"); MarkNativeAsOptional("GetDemoRecordingNumber"); MarkNativeAsOptional("GetDemoRecordingTick"); }