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_3E8C[playerId] = pNetGame->GetTime();
|
||||||
}
|
}
|
||||||
field_30964 = 0;
|
field_30964 = 0;
|
||||||
field_30968 = 0;
|
m_iPoolSize = 0;
|
||||||
field_FA0 = pNetGame->GetTime();
|
field_FA0 = pNetGame->GetTime();
|
||||||
field_FA4 = 0;
|
field_FA4 = 0;
|
||||||
field_FA8 = 0;
|
field_FA8 = 0;
|
||||||
|
@ -32,7 +32,7 @@ private:
|
|||||||
char _gap2EA24[8000];
|
char _gap2EA24[8000];
|
||||||
|
|
||||||
int field_30964;
|
int field_30964;
|
||||||
int field_30968;
|
int m_iPoolSize;
|
||||||
int field_3096C;
|
int field_3096C;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -64,6 +64,7 @@ public:
|
|||||||
|
|
||||||
BOOL IsNPC(PLAYERID playerId) { return m_bIsAnNPC[playerId]; };
|
BOOL IsNPC(PLAYERID playerId) { return m_bIsAnNPC[playerId]; };
|
||||||
|
|
||||||
|
int GetPoolSize() { return m_iPoolSize; };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,10 +9,16 @@ static cell AMX_NATIVE_CALL n_gpci(AMX *amx, cell *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// native GetPlayerPoolSize()
|
||||||
static cell AMX_NATIVE_CALL n_GetPlayerPoolSize(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetPlayerPoolSize(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: GetPlayerPoolSize
|
if(!pNetGame) return -1;
|
||||||
return 0;
|
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||||
|
if(pPlayerPool) {
|
||||||
|
return pPlayerPool->GetPoolSize();
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL n_GetVehiclePoolSize(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetVehiclePoolSize(AMX *amx, cell *params)
|
||||||
|
Loading…
Reference in New Issue
Block a user