From 4a2c40731df619d0949e14f62f0b67b05087c8a2 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Wed, 22 Nov 2023 23:38:00 +0800 Subject: [PATCH] [server] Implement CPlayerPool contructor --- server/main.h | 3 +++ server/playerpool.cpp | 18 ++++++++++++++++++ server/playerpool.h | 22 +++++++++++++++++++++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/server/main.h b/server/main.h index 5e2a42f..a151872 100644 --- a/server/main.h +++ b/server/main.h @@ -58,6 +58,9 @@ // amx #include "amx/amx.h" +// SA-MP + +typedef unsigned short PLAYERID; #include "console.h" #include "scrhttps.h" #include "scrtimers.h" diff --git a/server/playerpool.cpp b/server/playerpool.cpp index e69de29..170b405 100644 --- a/server/playerpool.cpp +++ b/server/playerpool.cpp @@ -0,0 +1,18 @@ + +#include "main.h" + +CPlayerPool::CPlayerPool() +{ + for(PLAYERID PlayerID = 0; PlayerID < MAX_PLAYERS; PlayerID++) { + m_bPlayerSlotState[PlayerID] = FALSE; + field_2599C[PlayerID] = 0; + field_23A5C[PlayerID] = 0; + field_3E8C[PlayerID] = pNetGame->GetTime(); + } + field_30964 = 0; + field_30968 = 0; + field_FA0 = pNetGame->GetTime(); + field_FA4 = 0; + field_FA8 = 0; + field_3096C = 0; +} diff --git a/server/playerpool.h b/server/playerpool.h index a03e600..fe13981 100644 --- a/server/playerpool.h +++ b/server/playerpool.h @@ -11,7 +11,27 @@ typedef struct _PLAYER_SPAWN_INFO // size: 46 class CPlayerPool // size: WL 199024 { private: - char _gap[199024]; + + int m_iVirtualWorld[MAX_PLAYERS]; + int field_FA0; + int field_FA4; + int field_FA8; + int m_iPlayerScore[MAX_PLAYERS]; + int m_iPlayerMoney[MAX_PLAYERS]; + char gap2EEC[4000]; + DWORD field_3E8C[1000]; + int field_23A5C[1000]; + BOOL m_bPlayerSlotState[MAX_PLAYERS]; + int field_2599C[1000]; + char gap2693C[41000]; + int field_30964; + int field_30968; + int field_3096C; + +public: + + CPlayerPool(); + }; #endif