09.01.2013, 13:04
(
Last edited by William1122; 09/01/2013 at 07:32 PM.
)
Code:
stock StopRefueling(playerid) { GivePlayerCash(playerid, -100); SendFormattedMessage(playerid, COLOR_WHITE,"Your vehicle's tank has been refilled for $100.");
Code:
forward ReFill(playerid); public ReFill(playerid) { if(!IsAtFuelStation(playerid) || !IsPlayerInAnyVehicle(playerid) || VehicleFuel[GetPlayerVehicleID(playerid)] >= 100.0 || GetPlayerCash(playerid) < 1) { StopRefueling(playerid); } else { new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective); if(engine == VEHICLE_PARAMS_ON) return StopRefueling(playerid); VehicleFuel[GetPlayerVehicleID(playerid)] += 1.0; RefuelingVehiclePrice[playerid] += 30; if(VehicleFuel[GetPlayerVehicleID(playerid)] >= 100.0) VehicleFuel[GetPlayerVehicleID(playerid)] = 100.0; } return true; }