mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 20:26:14 +08:00
33 lines
733 B
C++
33 lines
733 B
C++
|
|
#include "../main.h"
|
|
extern CNetGame *pNetGame;
|
|
|
|
//----------------------------------------------------
|
|
|
|
CVehiclePool::CVehiclePool()
|
|
{
|
|
// loop through and initialize all net players to null and slot states to false
|
|
for(VEHICLEID VehicleID = 0; VehicleID < MAX_VEHICLES; VehicleID++) {
|
|
field_84D0[VehicleID] = 0;
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------
|
|
|
|
CVehiclePool::~CVehiclePool()
|
|
{
|
|
for(VEHICLEID VehicleID = 0; VehicleID < MAX_VEHICLES; VehicleID++) {
|
|
Delete(VehicleID);
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------
|
|
|
|
BOOL CVehiclePool::Delete(VEHICLEID VehicleID)
|
|
{
|
|
pNetGame->SetVehicleAdded(VehicleID, FALSE);
|
|
return TRUE;
|
|
}
|
|
|
|
//----------------------------------------------------
|