DK22Pac / plugin-sdk

An SDK for developing ASI/CLEO plugins for GTA San Andreas, GTA Vice City and GTA III
zlib License
427 stars 116 forks source link

How to access CPools? #133

Closed Frouk3 closed 2 years ago

Frouk3 commented 2 years ago

Question: How

Izzotop commented 2 years ago

https://github.com/DK22Pac/plugin-sdk/blob/master/examples/ColouredObjects/Main.cpp#L79

Frouk3 commented 2 years ago

But without plugin?

Izzotop commented 2 years ago

GetVehiclePool() == CPools::ms_pVehiclePool

// 0x42C250
bool CCarCtrl::IsAnyoneParking() {
    for (auto i = 0; i < GetVehiclePool()->GetSize(); i++) {
        if (auto vehicle = GetVehiclePool()->GetAt(i)) {
          ...
        }
    }
    return false;
}
Frouk3 commented 2 years ago

ty