mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[server] Implement and match n_GetVehiclePoolSize(...)
This commit is contained in:
parent
65ef695183
commit
026d199e61
@ -78,6 +78,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
CPlayerPool * GetPlayerPool() { return m_pPlayerPool; };
|
CPlayerPool * GetPlayerPool() { return m_pPlayerPool; };
|
||||||
|
CVehiclePool * GetVehiclePool() { return m_pVehiclePool; };
|
||||||
RakServerInterface * GetRakServer() { return m_pRak; };
|
RakServerInterface * GetRakServer() { return m_pRak; };
|
||||||
CGameMode * GetGameMode() { return m_pGameMode; };
|
CGameMode * GetGameMode() { return m_pGameMode; };
|
||||||
CFilterScripts * GetFilterScripts() { return m_pFilterScripts; };
|
CFilterScripts * GetFilterScripts() { return m_pFilterScripts; };
|
||||||
|
@ -21,10 +21,16 @@ static cell AMX_NATIVE_CALL n_GetPlayerPoolSize(AMX *amx, cell *params)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// native GetVehiclePoolSize()
|
||||||
static cell AMX_NATIVE_CALL n_GetVehiclePoolSize(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetVehiclePoolSize(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: GetVehiclePoolSize
|
if(!pNetGame) return -1;
|
||||||
return 0;
|
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
|
||||||
|
if(pVehiclePool) {
|
||||||
|
return pVehiclePool->GetPoolSize();
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL n_GetActorPoolSize(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetActorPoolSize(AMX *amx, cell *params)
|
||||||
|
@ -9,7 +9,7 @@ CVehiclePool::CVehiclePool()
|
|||||||
field_D4[VehicleID] = 0;
|
field_D4[VehicleID] = 0;
|
||||||
}
|
}
|
||||||
memset(field_0,0,sizeof(field_0));
|
memset(field_0,0,sizeof(field_0));
|
||||||
field_5E94 = 0;
|
m_iPoolSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVehiclePool::~CVehiclePool()
|
CVehiclePool::~CVehiclePool()
|
||||||
|
@ -9,7 +9,7 @@ private:
|
|||||||
int field_D4[2000];
|
int field_D4[2000];
|
||||||
int field_2014[2000];
|
int field_2014[2000];
|
||||||
int field_3F54[2000];
|
int field_3F54[2000];
|
||||||
int field_5E94;
|
int m_iPoolSize;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CVehiclePool();
|
CVehiclePool();
|
||||||
@ -18,6 +18,8 @@ public:
|
|||||||
BOOL Delete(VEHICLEID VehicleID);
|
BOOL Delete(VEHICLEID VehicleID);
|
||||||
|
|
||||||
int GetModelCount();
|
int GetModelCount();
|
||||||
|
|
||||||
|
int GetPoolSize() { return m_iPoolSize; };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user