mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 02:18:26 +00:00
Add Natives for SetStart/DeleteSetStart
This commit is contained in:
parent
9fcaa57362
commit
21cd90597b
@ -1058,6 +1058,24 @@ native Database Shavit_GetDatabase();
|
||||
*/
|
||||
native void Shavit_StartTimer(int client, int track);
|
||||
|
||||
/**
|
||||
* Sets the player's current location as their spawn location for the specified track.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param track Timer track.
|
||||
* @noreturn
|
||||
*/
|
||||
native void Shavit_SetStart(int client);
|
||||
|
||||
/**
|
||||
* Deletes the player's current set start position for the specified track.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param track Timer track.
|
||||
* @noreturn
|
||||
*/
|
||||
native void Shavit_DeleteSetStart(int client, int track);
|
||||
|
||||
/**
|
||||
* Restarts the timer for a player.
|
||||
* Will work as if the player just used sm_r.
|
||||
@ -2337,6 +2355,8 @@ public void __pl_shavit_SetNTVOptional()
|
||||
MarkNativeAsOptional("Shavit_SetReplayData");
|
||||
MarkNativeAsOptional("Shavit_StartReplay");
|
||||
MarkNativeAsOptional("Shavit_StartTimer");
|
||||
MarkNativeAsOptional("Shavit_SetStart");
|
||||
MarkNativeAsOptional("Shavit_DeleteSetStart");
|
||||
MarkNativeAsOptional("Shavit_StopChatSound");
|
||||
MarkNativeAsOptional("Shavit_StopTimer");
|
||||
MarkNativeAsOptional("Shavit_WR_DeleteMap");
|
||||
|
||||
@ -191,6 +191,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
|
||||
CreateNative("Shavit_IsClientCreatingZone", Native_IsClientCreatingZone);
|
||||
CreateNative("Shavit_ZoneExists", Native_ZoneExists);
|
||||
CreateNative("Shavit_Zones_DeleteMap", Native_Zones_DeleteMap);
|
||||
CreateNative("Shavit_SetStart", Native_SetStart);
|
||||
|
||||
// registers library, check "bool LibraryExists(const char[] name)" in order to use with other plugins
|
||||
RegPluginLibrary("shavit-zones");
|
||||
@ -559,6 +560,16 @@ public int Native_IsClientCreatingZone(Handle handler, int numParams)
|
||||
return (gI_MapStep[GetNativeCell(1)] != 0);
|
||||
}
|
||||
|
||||
public int Native_SetStart(Handle handler, int numParams)
|
||||
{
|
||||
SetStart(GetNativeCell(1), GetNativeCell(2));
|
||||
}
|
||||
|
||||
public int Native_DeleteSetStart(Handle handler, int numParams)
|
||||
{
|
||||
DeleteSetStart(GetNativeCell(1), GetNativeCell(2));
|
||||
}
|
||||
|
||||
bool LoadZonesConfig()
|
||||
{
|
||||
char sPath[PLATFORM_MAX_PATH];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user