mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Add a native for getting Shavit's replay folder path for personal replays
This commit is contained in:
parent
b3f89493b0
commit
70ca6ace3d
@ -265,6 +265,15 @@ native void Shavit_GetReplayName(int style, int track, char[] buffer, int length
|
|||||||
*/
|
*/
|
||||||
native void Shavit_GetReplayCacheName(int bot, char[] buffer, int length);
|
native void Shavit_GetReplayCacheName(int bot, char[] buffer, int length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the folder path where the replay files are saved.
|
||||||
|
*
|
||||||
|
* @param buffer Buffer string.
|
||||||
|
* @param length String length.
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
native void Shavit_GetReplayFolderPath(char[] buffer, int length);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if there's loaded replay data for a bhop style or not.
|
* Checks if there's loaded replay data for a bhop style or not.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -284,6 +284,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
|
|||||||
CreateNative("Shavit_StartReplayFromFile", Native_StartReplayFromFile);
|
CreateNative("Shavit_StartReplayFromFile", Native_StartReplayFromFile);
|
||||||
CreateNative("Shavit_GetLoopingBotByName", Native_GetLoopingBotByName);
|
CreateNative("Shavit_GetLoopingBotByName", Native_GetLoopingBotByName);
|
||||||
CreateNative("Shavit_SetReplayCacheName", Native_SetReplayCacheName);
|
CreateNative("Shavit_SetReplayCacheName", Native_SetReplayCacheName);
|
||||||
|
CreateNative("Shavit_GetReplayFolderPath", Native_GetReplayFolderPath);
|
||||||
|
|
||||||
if (!FileExists("cfg/sourcemod/plugin.shavit-replay-playback.cfg") && FileExists("cfg/sourcemod/plugin.shavit-replay.cfg"))
|
if (!FileExists("cfg/sourcemod/plugin.shavit-replay-playback.cfg") && FileExists("cfg/sourcemod/plugin.shavit-replay.cfg"))
|
||||||
{
|
{
|
||||||
@ -1390,6 +1391,11 @@ public int Native_SetReplayCacheName(Handle plugin, int numParams)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int Native_GetReplayFolderPath(Handle handler, int numParams)
|
||||||
|
{
|
||||||
|
return SetNativeString(1, gS_ReplayFolder, GetNativeCell(2));
|
||||||
|
}
|
||||||
|
|
||||||
public Action Timer_Cron(Handle Timer)
|
public Action Timer_Cron(Handle Timer)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= MaxClients; i++)
|
for (int i = 1; i <= MaxClients; i++)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user