27.01.2014, 11:44
Код:
stock GetCenterOfTrunk(vehicleid, &Float:x, &Float:y, &Float:z) { new model = GetVehicleModel(vehicleid); if (!model) return 0; new Float:fPosition[5]; GetVehicleZAngle(vehicleid, fPosition[3]); GetVehiclePos(vehicleid, fPosition[0], fPosition[1], fPosition[2]); GetVehicleModelInfo(model, VEHICLE_MODEL_INFO_REAR_BUMPER_Z, x, y, z); fPosition[4] = z; x += fPosition[0]; y += fPosition[1]; x -= (2.35 * (floatsin(-fPosition[3], degrees))); y -= (2.35 * (floatcos(fPosition[3], degrees))); return 1; }