mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[server] Implement and match n_GetPlayerPoolSize(...)
This commit is contained in:
parent
fdd891098b
commit
65ef695183
@ -11,7 +11,7 @@ CPlayerPool::CPlayerPool()
|
||||
field_3E8C[playerId] = pNetGame->GetTime();
|
||||
}
|
||||
field_30964 = 0;
|
||||
field_30968 = 0;
|
||||
m_iPoolSize = 0;
|
||||
field_FA0 = pNetGame->GetTime();
|
||||
field_FA4 = 0;
|
||||
field_FA8 = 0;
|
||||
|
@ -32,7 +32,7 @@ private:
|
||||
char _gap2EA24[8000];
|
||||
|
||||
int field_30964;
|
||||
int field_30968;
|
||||
int m_iPoolSize;
|
||||
int field_3096C;
|
||||
|
||||
public:
|
||||
@ -64,6 +64,7 @@ public:
|
||||
|
||||
BOOL IsNPC(PLAYERID playerId) { return m_bIsAnNPC[playerId]; };
|
||||
|
||||
int GetPoolSize() { return m_iPoolSize; };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -9,10 +9,16 @@ static cell AMX_NATIVE_CALL n_gpci(AMX *amx, cell *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// native GetPlayerPoolSize()
|
||||
static cell AMX_NATIVE_CALL n_GetPlayerPoolSize(AMX *amx, cell *params)
|
||||
{
|
||||
// TODO: GetPlayerPoolSize
|
||||
return 0;
|
||||
if(!pNetGame) return -1;
|
||||
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||
if(pPlayerPool) {
|
||||
return pPlayerPool->GetPoolSize();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL n_GetVehiclePoolSize(AMX *amx, cell *params)
|
||||
|
Loading…
Reference in New Issue
Block a user