SA-MP/bot/net/vehiclepool.cpp

33 lines
728 B
C++
Raw Normal View History

2023-10-31 21:31:16 +08:00
2024-01-15 23:52:08 +08:00
#include "../main.h"
extern CNetGame *pNetGame;
2024-01-15 23:52:08 +08:00
//----------------------------------------------------
2023-10-31 21:31:16 +08:00
CVehiclePool::CVehiclePool()
{
2024-01-15 23:52:08 +08:00
// 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;
2023-10-31 21:31:16 +08:00
}
}
2024-01-15 23:52:08 +08:00
//----------------------------------------------------
CVehiclePool::~CVehiclePool()
{
for(VEHICLEID VehicleID = 0; VehicleID < MAX_VEHICLES; VehicleID++) {
Delete(VehicleID);
}
}
//----------------------------------------------------
BOOL CVehiclePool::Delete(VEHICLEID VehicleID)
{
pNetGame->sub_415EC0(VehicleID, FALSE);
return TRUE;
}
//----------------------------------------------------