cell AMX_NATIVE_CALL Natives::IsTrailerAttachedToDynamicVeh(AMX *amx, cell *params) { CHECK_PARAMS(1, "IsTrailerAttachedToDynamicVeh"); boost::unordered_map<int, Item::SharedVehicle>::iterator v = core->getData()->vehicles.find(static_cast<int>(params[1])); if (v != core->getData()->vehicles.end()) { boost::unordered_map<int, int>::iterator i = core->getData()->internalVehicles.find(v->first); if (i != core->getData()->internalVehicles.end()) { return IsTrailerAttachedToVehicle(i->second); } } return 0; }
bool IsTrailerAttached() const { return IsTrailerAttachedToVehicle(id_); }