Help on my Refuel!
#5

Код:
CMD:refuel(playerid, params[])
{
	if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
		new vehicleid = GetPlayerVehicleID(playerid);
		new engine,lights,alarm,doors,bonnet,boot,objective;
		GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
		if(engine == VEHICLE_PARAMS_ON) return SendClientMessageEx(playerid, COLOR_RED, "You need to shut off the engine before filling up (/car engine or press 2).");
		if(!IsAtFuelStation(playerid)) return SendClientMessageEx(playerid, COLOR_RED, "You're not at a fuel station.");
		if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_RED,"This vehicle doesn't need fuel.");
		if(VehicleFuel[vehicleid] >= 100.0) return SendClientMessageEx(playerid, COLOR_RED, "This vehicle's tank is already full.");
		if(RefuelingVehicle[playerid] == 1) return SendClientMessageEx(playerid, COLOR_RED, "You are refilling your vehicle's tank.");
		SendClientMessageEx(playerid, COLOR_WHITE, "Refueling your vehicle's tank, please wait.");
		RefuelingVehicle[playerid] = 1;
		RefuelingVehicleTimer[playerid] = SetTimerEx("ReFill", 1000, 0, "i", playerid);
	}
	return 1;
}
Reply


Messages In This Thread
Help on my Refuel! - by edgargreat - 08.10.2012, 10:25
AW: Help on my Refuel! - by BiosMarcel - 08.10.2012, 10:44
Re: Help on my Refuel! - by edgargreat - 08.10.2012, 11:25
AW: Help on my Refuel! - by BiosMarcel - 08.10.2012, 11:27
Re: Help on my Refuel! - by edgargreat - 08.10.2012, 11:44
Re: Help on my Refuel! - by Roel - 08.10.2012, 11:45

Forum Jump:


Users browsing this thread: 2 Guest(s)