Couple of warnings.
#1

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;
}
Thank you
Reply


Messages In This Thread
Couple of warnings. - by killerx100 - 15.06.2009, 09:21
Re: Couple of warnings. - by MenaceX^ - 15.06.2009, 10:02
Re: Couple of warnings. - by killerx100 - 15.06.2009, 18:56

Forum Jump:


Users browsing this thread: 1 Guest(s)