mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Can be toggled with the new cvar 'host_autoReloadRespectGameState', and used in combination with the new server script func 'SetAutoReloadState( bool state )'. This makes sure that even when the timer reaches 'host_autoReloadRate', it would wait with the reload until the game itself is finished (which is when SetAutoReloadState( true ) is being called from scripts).
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#ifndef VSCRIPT_SERVER_H
|
|
#define VSCRIPT_SERVER_H
|
|
#include "vscript/languages/squirrel_re/vsquirrel.h"
|
|
|
|
namespace VScriptCode
|
|
{
|
|
namespace Server
|
|
{
|
|
SQRESULT CreateServer(HSQUIRRELVM v);
|
|
SQRESULT DestroyServer(HSQUIRRELVM v);
|
|
|
|
SQRESULT SetAutoReloadState(HSQUIRRELVM v);
|
|
|
|
SQRESULT KickPlayerByName(HSQUIRRELVM v);
|
|
SQRESULT KickPlayerById(HSQUIRRELVM v);
|
|
SQRESULT BanPlayerByName(HSQUIRRELVM v);
|
|
SQRESULT BanPlayerById(HSQUIRRELVM v);
|
|
SQRESULT UnbanPlayer(HSQUIRRELVM v);
|
|
|
|
SQRESULT GetNumHumanPlayers(HSQUIRRELVM v);
|
|
SQRESULT GetNumFakeClients(HSQUIRRELVM v);
|
|
|
|
SQRESULT IsServerActive(HSQUIRRELVM v);
|
|
SQRESULT IsDedicated(HSQUIRRELVM v);
|
|
}
|
|
}
|
|
|
|
void Script_RegisterServerFunctions(CSquirrelVM* s);
|
|
void Script_RegisterCoreServerFunctions(CSquirrelVM* s);
|
|
void Script_RegisterAdminPanelFunctions(CSquirrelVM* s);
|
|
|
|
void Script_RegisterServerEnums(CSquirrelVM* const s);
|
|
|
|
#define DEFINE_SERVER_SCRIPTFUNC_NAMED(s, functionName, helpString, \
|
|
returnType, parameters) \
|
|
s->RegisterFunction(#functionName, MKSTRING(Script_##functionName), \
|
|
helpString, returnType, parameters, VScriptCode::Server::##functionName); \
|
|
|
|
#endif // VSCRIPT_SERVER_H
|