05.07.2013, 16:53
pawn Код:
new Float:FillAmount = 20; // try to remove the PlayerInfo[playerid][pCanFuel] this should be fixed somehow.
if((Fuel[closestcar] - FillAmount) < 0)
{
PlayerInfo[playerid][pCanFuel] += Fuel[closestcar];
Fuel[closestcar] = 0.0;
format(string,sizeof(string),"* %s opens the bottom of the vehicles gas tank, uses their siphon to drain the gasoline into the gascan, but extracts nothing from the empty gastank.",RPN(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE);
}
else
{
PlayerInfo[playerid][pCanFuel] += FillAmount;
Fuel[closestcar] -= FillAmount;
format(string,sizeof(string),"* %s opens the bottom of the vehicles gas tank, uses their siphon to drain the gasoline into the gascan.",RPN(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE);
}