Couple of warnings. -
Hello, I'm using Stefan Speedometer but I changed it a bit. So can someone please check my code and tell me what I did wrong?
pawn Код:
public ReFill(playerid)
{
new string[256];
new vehicleid = GetPlayerVehicleID(playerid);
new Float:x, Float:y, Float:z;
if(IsPlayerConnected(playerid) && Fuel[vehicleid] < 100){
Fuel[vehicleid] += 1;
if(GetPlayerState(x,y,z) != IsAtFuelStation1(playerid) || !IsPlayerInAnyVehicle(playerid) || Fuel[vehicleid] >= 100){
new RefueledAmount = floatround(Fuel[ vehicleid]) - OldFuel[playerid];
GivePlayerMoney(playerid, -RefueledAmount);
format(string, sizeof(string),".:: [FUEL]: Your vehicle has been refuled for $%d.", RefueledAmount);
SendClientMessage(playerid, COLOR_YELLOW, string);
BizzInfo[10][bTill] += RefueledAmount;
ExtortionBiz(10, RefueledAmount);
BizzInfo[10][bProducts]-= RefueledAmount;
KillTimer(ReFuelTimer[playerid]); Refueling[playerid] = 0;
}
else if(GetPlayerState(x,y,z) != IsAtFuelStation2(playerid) || !IsPlayerInAnyVehicle(playerid) || Fuel[vehicleid] >= 100){
new RefueledAmount = floatround(Fuel[ vehicleid]) - OldFuel[playerid];
GivePlayerMoney(playerid, -RefueledAmount);
format(string, sizeof(string),".:: [FUEL]: Your vehicle has been refuled for $%d.", RefueledAmount);
SendClientMessage(playerid, COLOR_YELLOW, string);
BizzInfo[11][bTill] += RefueledAmount;
ExtortionBiz(11, RefueledAmount);
BizzInfo[11][bProducts]-= RefueledAmount;
KillTimer(ReFuelTimer[playerid]); Refueling[playerid] = 0;
}
else if(GetPlayerState(x,y,z) != IsAtFuelStation3(playerid) || !IsPlayerInAnyVehicle(playerid) || Fuel[vehicleid] >= 100){
new RefueledAmount = floatround(Fuel[ vehicleid]) - OldFuel[playerid];
GivePlayerMoney(playerid, -RefueledAmount);
format(string, sizeof(string),".:: [FUEL]: Your vehicle has been refuled for $%d.", RefueledAmount);
SendClientMessage(playerid, COLOR_YELLOW, string);
BizzInfo[12][bTill] += RefueledAmount;
ExtortionBiz(12, RefueledAmount);
BizzInfo[12][bProducts]-= RefueledAmount;
KillTimer(ReFuelTimer[playerid]); Refueling[playerid] = 0;
}
else if(GetPlayerState(x,y,z) != IsAtFuelStation4(playerid) || !IsPlayerInAnyVehicle(playerid) || Fuel[vehicleid] >= 100){
new RefueledAmount = floatround(Fuel[ vehicleid]) - OldFuel[playerid];
GivePlayerMoney(playerid, -RefueledAmount);
format(string, sizeof(string),".:: [FUEL]: Your vehicle has been refuled for $%d.", RefueledAmount);
SendClientMessage(playerid, COLOR_YELLOW, string);
BizzInfo[13][bTill] += RefueledAmount;
ExtortionBiz(13, RefueledAmount);
BizzInfo[13][bProducts]-= RefueledAmount;
KillTimer(ReFuelTimer[playerid]); Refueling[playerid] = 0;
}
else if(GetPlayerState(x,y,z) != IsAtFuelStation5(playerid) || !IsPlayerInAnyVehicle(playerid) || Fuel[vehicleid] >= 100){
new RefueledAmount = floatround(Fuel[ vehicleid]) - OldFuel[playerid];
GivePlayerMoney(playerid, -RefueledAmount);
format(string, sizeof(string),".:: [FUEL]: Your vehicle has been refuled for $%d.", RefueledAmount);
SendClientMessage(playerid, COLOR_YELLOW, string);
BizzInfo[14][bTill] += RefueledAmount;
ExtortionBiz(14, RefueledAmount);
BizzInfo[14][bProducts]-= RefueledAmount;
KillTimer(ReFuelTimer[playerid]); Refueling[playerid] = 0;
}
}
return 1;
}
Re: Couple of warnings. -
You didn't even say it.
Re: Couple of warnings. -
Its fuel system + speedometer. I have to spam /refuel command. It gives you only one fuel.