diff --git a/csgo2/events.cpp b/csgo2/events.cpp index 146609e..208b725 100644 --- a/csgo2/events.cpp +++ b/csgo2/events.cpp @@ -162,8 +162,7 @@ auto OnPlayerDeathEvent(IGameEvent* event) -> void { const auto attackerIndex = attacker->GetRefEHandle().GetEntryIndex(); ScriptCallBacks::luaCall_onPlayerDeath(victimIndex, attackerIndex, isHeadShot); - // printf("player[%p] %s kill[%p] %llu\n", attacker, - // &attacker->m_iszPlayerName(), victim, &victim->m_steamID()); + //printf("player[%p] %s kill[%p] %llu\n", attacker, &attacker->m_iszPlayerName(), victim, &victim->m_steamID()); } auto OnPlayerChat(CCSPlayerController* player, std::string message) -> bool { auto [procesChatSuccess, chatType, chatCtx] = diff --git a/csgo2/script_apis.cpp b/csgo2/script_apis.cpp index a50d598..10f8833 100644 --- a/csgo2/script_apis.cpp +++ b/csgo2/script_apis.cpp @@ -716,12 +716,12 @@ auto luaApi_RunServerCommand(lua_State* luaVm) -> int { } auto luaApi_GetPlayerSteamId(lua_State* luaVm) -> int { const auto playerIndex = lua_tointeger(luaVm, 1); - uint64_t steamid; + std::string steamid; ExcutePlayerAction(playerIndex, [&](CCSPlayerController* playerController) { - steamid = playerController->m_steamID(); + steamid = std::to_string(playerController->m_steamID()); }); lua_pop(luaVm, 1); - lua_pushinteger(luaVm, steamid); + lua_pushstring(luaVm, steamid.c_str()); return 1; } auto luaApi_KickPlayer(lua_State* luaVm) -> int {