增加serverfunctionhash函数

This commit is contained in:
Huoji's
2023-10-03 00:25:23 +08:00
parent 88f121e295
commit f08e0b90fa
21 changed files with 554 additions and 101 deletions

22
csgo2/script_callbacks.h Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
#include "head.h"
namespace ScriptCallBacks {
extern std::shared_mutex mutex_callbackList;
enum class _CallbackNames {
kError,
kOnPlayerConnect,
kOnPlayerDisconnect,
kOnPlayerDeath
};
extern std::unordered_map<lua_State*, std::unordered_map<_CallbackNames, int>>
callbackList;
auto CallBackNameToEnum(const char* name) -> ScriptCallBacks::_CallbackNames;
auto luaCall_onPlayerConnect(int player, int playerSlot, const char* playerName,
uint64_t xuid, const char* SteamId,
const char* IpAddress, bool isBot) -> void;
auto luaCall_onPlayerDisconnect(int player, int slot, const char* pszName,
uint64_t xuid, const char* pszNetworkID,
const char* pszAddress, bool bFakePlayer)
-> void;
auto luaCall_onPlayerDeath(int victim, int killer) -> void;
} // namespace ScriptCallBacks