update sdk, fix weapon drop bug, update gamevent struct from hl2sdk

This commit is contained in:
Huoji's
2023-10-11 03:58:34 +08:00
parent 2f654c5d92
commit 79bc2cf89d
11 changed files with 266 additions and 156 deletions

View File

@@ -790,6 +790,7 @@ auto luaApi_HttpPost(lua_State* luaVm) -> int {
lua_pushstring(luaVm, response.c_str());
return 2;
}
auto initFunciton(lua_State* luaVm) -> void {
lua_register(luaVm, "ListenToGameEvent", luaApi_ListenToGameEvent);
lua_register(luaVm, "luaApi_SetPlayerCurrentWeaponAmmo",
@@ -838,6 +839,7 @@ auto initFunciton(lua_State* luaVm) -> void {
lua_register(luaVm, "luaApi_HttpGet", luaApi_HttpGet);
lua_register(luaVm, "luaApi_HttpPost", luaApi_HttpPost);
lua_register(luaVm, "luaApi_GetPlayerSteamId", luaApi_GetPlayerSteamId);
//lua_register(luaVm, "luaApi_TeleportPlayer", luaApi_TeleportPlayer);
luabridge::getGlobalNamespace(luaVm)
.beginClass<_luaApi_WeaponInfo>("WeaponInfo")