Not working
#1

Why this code don't work, when ever I buy gas can and i want to use it with /usegc it says: "You don't have any gas can to use"

pawn Код:
if(strcmp(cmdtext, "/usegc", true) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"{FF6A22}INFO: {FFFFFF}You need to be in vehicle to use this command.");
        else if(engine == 1) return SendClientMessage(playerid, COLOR_RED,"{FF6A22}INFO: {FFFFFF}You need to turn off engine before using gas can.");
        else if(GCS[playerid] != 1 || GCM[playerid] != 1 || GCB[playerid] != 1) return SendClientMessage(playerid, COLOR_RED,"{FF6A22}INFO: {FFFFFF}You don't have any gas can to use");
        else
        {
            if(GCS[playerid] == 1)
            {
                GCS[playerid] --;
                return 1;
            }
            if(GCM[playerid] == 1)
            {
                GCM[playerid] --;
                return 1;
            }
            if(GCB[playerid] == 1)
            {
                GCB[playerid] --;
                return 1;
            }
            return 1;
        }
    }

    return 0;
}
Reply


Messages In This Thread
Not working - by Lajko1 - 25.11.2013, 16:38
Re: Not working - by Konstantinos - 25.11.2013, 16:47
Re: Not working - by Lajko1 - 25.11.2013, 17:10
Re: Not working - by Konstantinos - 25.11.2013, 17:23
Re: Not working - by Lajko1 - 25.11.2013, 17:30
Re: Not working - by Konstantinos - 25.11.2013, 17:40
Re: Not working - by Lajko1 - 25.11.2013, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)