Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
fix steamid type
Browse files Browse the repository at this point in the history
  • Loading branch information
huoji120 committed Oct 10, 2023
1 parent 0266a48 commit 2f654c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions csgo2/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
6 changes: 3 additions & 3 deletions csgo2/script_apis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2f654c5

Please sign in to comment.