It tells me Im not near a gas station
#1

So, I am using the EXACT same way for /enter
But with /refuel it tells me im not near a gas station

pawn Код:
CMD:refuel(playerid, params[])
{
    if (IsPlayerInAnyVehicle(playerid))
    {
        if (isrefuelling[playerid] == 0)
        {
            for(new h = 0; h < sizeof(BizzInfo); h++)
            {
                format(file6, sizeof(file6), "realityrp/bizzes/%d.ini", h);
                BizzInfo[h][benx] = dini_Float(file6, "benx");
                BizzInfo[h][beny] = dini_Float(file6, "beny");
                BizzInfo[h][benz] = dini_Float(file6, "benz");
                if(IsPlayerInRangeOfPoint(playerid, 15, dini_Float(file6, "benx"), dini_Float(file6, "beny"), dini_Float(file6, "benz")))
                {
                    if(BizzInfo[h][bprods] >= 5)
                    {
                        if(GetPlayerMoney(playerid) >= BizzInfo[h][bfee])
                        {
                            if(BizzInfo[h][btype] == 7)
                            {
                            GivePlayerMinusCash(playerid,BizzInfo[h][bfee]);
                            SetCameraBehindPlayer(playerid);
                            TogglePlayerControllable(playerid,0);refuel at the same time
                            isrefuelling[playerid] = 1; /refuel
                            TextDrawSetString(td_fuel[playerid],"Refuelling..."); /refuel
                            SetTimerEx("timer_refuel",4500,false,"i",playerid);
                            BizzInfo[h][bprods] = BizzInfo[h][bprods] - 5;
                            BizzInfo[h][bbank] = BizzInfo[h][bbank] + BizzInfo[h][bfee];
                            BizzInfo[h][customers] = BizzInfo[h][customers] + 1;
                            }
                            else return SendClientMessage(playerid, COLOR_GREY, "You are not at a Gass Station!");
                        }
                        else return SendClientMessage(playerid, COLOR_GREY, "Not enough money!");
                    }
                    else return SendClientMessage(playerid, COLOR_GREY, "Gas station is empty! A petrol trucker is needed to refill!");
                }
                else return SendClientMessage(playerid, COLOR_GREY, "You are not at a gas station!");
            }
            return 1;
        }
        else return SendClientMessage(playerid, COLOR_GREY, "You are already refueling!");
    }
    else return SendClientMessage(playerid, COLOR_GREY, "You must be in a vehicle to do this!");
}
Reply


Messages In This Thread
It tells me Im not near a gas station - by milanosie - 09.02.2012, 19:36
Re: It tells me Im not near a gas station - by MP2 - 09.02.2012, 20:12
Re: It tells me Im not near a gas station - by milanosie - 09.02.2012, 20:15
Re: It tells me Im not near a gas station - by MP2 - 09.02.2012, 20:17
Re: It tells me Im not near a gas station - by milanosie - 09.02.2012, 20:22
Re : It tells me Im not near a gas station - by ricardo178 - 09.02.2012, 21:04
Re: It tells me Im not near a gas station - by milanosie - 09.02.2012, 21:05
Re: It tells me Im not near a gas station - by MP2 - 09.02.2012, 21:09
Re: It tells me Im not near a gas station - by Vince - 09.02.2012, 22:25
Re : Re: It tells me Im not near a gas station - by ricardo178 - 09.02.2012, 22:52

Forum Jump:


Users browsing this thread: 1 Guest(s)