17.07.2016, 15:01
Код:
#define TWO_TIRE_VEHICLE 1 #define SIX_TIRE_VEHICLE 2 #define NO_TIRE_VEHICLE 3 #define ENGINE_ONLY_VEHICLE 4 GetVehicleType(vehicleid) { switch (vehicleid) { case 468: return TWO_TIRE_VEHICLE; case 431, 455, 433, 544: return SIX_TIRE_VEHICLE; case 509, 510: return NO_TIRE_VEHICLE; case 417, 453, 473, 484, 487, 497, 511, 592: return ENGINE_ONLY_VEHICLE; default: return 0; } } // Where you want to use it switch (GetVehicleType(GetPlayerVehicleID(playerid))) { case TWO_TIRE_VEHICLE: { } case SIX_TIRE_VEHICLE: { } case NO_TIRE_VEHICLE: { } case ENGINE_ONLY_VEHICLE: { } }