rendered paste body/*
*
* Gasoline Inc by Pixels^
* Inc is not for sale
*
*/
#if defined _gas_included
#endinput
#endif
#define MAX_VEHICLE 255
new Gas[MAX_VEHICLE];
new E[MAX_VEHICLE];
stock xGas_SetGas(vehicleid,amount) {
return Gas[vehicleid] = amount;
}
native xGas_SetGas(vehicleid,amount);
stock xGas_GetGas(vehicleid) {
return Gas[vehicleid];
}
native xGas_GetGas(vehicleid);
stock xGas_SetAllGas(amount) {
for(new v=0; v<MAX_VEHICLE; v++) {
Gas[v] = amount;
}
return 1;
}
native xGas_SetAllGas(amount);
stock xGas_ShowGas(vehicleid) {
new string[76];
return format(string,sizeof(string),"%d",Gas[vehicleid]);
}
native xGas_ShowGas(vehicleid);
stock xGas_Deplete(vehicleid) {
return Gas[vehicleid]--;
}
native xGas_Deplete(vehicleid);
stock xGas_Add(vehicleid) {
return Gas[vehicleid]++;
}
native xGas_Fuel(vehicleid);
stock xGas_EngineOil(vehicleid,bool:PlusORMinus,amount) { // engine oil usage, 100 = god, 0 = bad
if(PlusORMinus == true) return E[vehicleid]+=amount;
if(PlusORMinus == false) return E[vehicleid]+=amount;
return false
}
native xGas_EngineOil(vehicleid,bool:PlusORMinus,amount);
stock xGas_SetAllEngineOil(amount) {
for(new v=0; v<MAX_VEHICLE; v++) return E[v] = amount;
return false;
}
native xGas_SetAllEngineOil(amount);
stock xGas_GetEngineOil(vehicleid) {
return E[vehicleid];
}
native xGas_GetEngineOil(vehicleid);