i need to make it so cops dont pay for fuel
#9

pawn Код:
CMD:refuel(playerid, params[])//Fuel System CMD REDONE BY BELKIN
{
    for(new i=1; i < MAX_FUEL_STATIONS; i++)
    {
        if(FuelStationCreated[i])
        {
            if(IsPlayerInRangeOfPoint(playerid, 15.0, FuelStationPos[i][0], FuelStationPos[i][1], FuelStationPos[i][2]))
            {
               if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not in an vehicle!");
               if (isrefuelling[playerid]) return SendClientMessage(playerid,0xFFC800FF,"refuelling your vehicle!");
               if (!IsACop(playerid) || !IsAGov(playerid) || !IsMedic(playerid)) return GivePlayerCash(playerid, -100); //Sets the player's cash -$100
               SetCameraBehindPlayer(playerid);
               TogglePlayerControllable(playerid,0);
               isrefuelling[playerid] = 1;
               TextDrawSetString(td_fuel[playerid],"Refuelling...");
               SetTimerEx("timer_refuel",4500,false,"i",playerid);
            }
        }
    }
    SendClientMessage(playerid, COLOR_RED, "You are not in a fuel station!");
    return 1;
}
It will work.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)