Warning
#7

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
I could be wrong, but having good indentation skills are key to being a successful scripter.

Try this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/exit", cmdtext, true)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                RemovePlayerFromVehicle(playerid);
                SCM(playerid,0xFFFF00AA,"* You left the vehicle.");
                TogglePlayerControllable(playerid,1);
            }
            else SCM(playerid,0xFFFF00AA,"* You are not in a vehicle!");
        }
        return 1;
    }
    if(strcmp("/afill", cmdtext, true)
    {
        if(IsPlayerAdmin(playerid))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                new VID = GetPlayerVehicleID(playerid);
                if(Vgas[VID] < 100) ShowMenuForPlayer(Gas,playerid);
                else SCM(playerid, 0xFFFF00AA, "* Your vehicle is full!");
            }
            else SCM(playerid,0xFFFF00AA,"* You are not in a vehicle!");
        }
        return 1;
    }
    if(strcmp("/fill", cmdtext, true) // <-------------- this is the line
    {
        if(IsAtGasStation(playerid))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                new VID = GetPlayerVehicleID(playerid);
                if(Vgas[VID] < 100) ShowMenuForPlayer(Gas,playerid);
                else SCM(playerid,0xFFFF00AA,"* Your vehicle is full!");
            }
            else SCM(playerid,0xFFFF00AA,"* You are not in a vehicle!");
        }
        else SCM(playerid,0xFFFF00AA,"* You are not at a gas station!");
        return 1;
    }
    return 0;
}

It fixed, thx
Reply


Messages In This Thread
Warning - by marinov - 09.12.2010, 01:23
Re: Warning - by Lynn - 09.12.2010, 01:25
Re: Warning - by marinov - 09.12.2010, 01:29
Re: Warning - by willsuckformoney - 09.12.2010, 01:43
Re: Warning - by Scenario - 09.12.2010, 01:44
Re: Warning - by XePloiT - 09.12.2010, 01:56
Re: Warning - by marinov - 09.12.2010, 03:38
Re: Warning - by Hal - 09.12.2010, 04:07
Re: Warning - by Scenario - 09.12.2010, 13:37

Forum Jump:


Users browsing this thread: 2 Guest(s)