23.06.2010, 10:21
Код:
public OnVehicleSpawn(vehicleid) { if(IsSmallVehicle(vehicleid)) { Vehicle[vehicleid][Fuel] = randomEx(SMALLV_GAS_MIN , SMALLV_GAS_MAX); } if(IsMidsizeVehicle(vehicleid)) { Vehicle[vehicleid][Fuel] = randomEx(MIDV_GAS_MIN, MIDV_GAS_MAX); } if(IsLargeVehicle(vehicleid)) { Vehicle[vehicleid][Fuel] = randomEx(LARGEV_GAS_MIN, LARGEV_GAS_MAX); } if(IsExLargeVehicle(vehicleid)) { Vehicle[vehicleid][Fuel] = randomEx(EXLARGEV_GAS_MIN, EXLARGEV_GAS_MAX); } return true; }
Код:
public OnVehicleSpawn(vehicleid) { Vehicle[vehicleid][Fuel] = randomEx(SMALLV_GAS_MIN , SMALLV_GAS_MAX); return true; }
Extra functions:
Код:
stock IsSmallVehicle(vehicleid) { switch ( GetVehicleModel(vehicleid)) { case 448, 457, 462, 461, 463, 468, 471, 485, 521, 522, 523, 530, 581, 586, 571, 572, 574, 583 : return true; } return false; }