Command Only working for ID:0
#6

How does it not allow you? What message do you get? I suggest you debugging your command.
pawn Код:
CMD:loadoil(playerid, params[])
{
    print("1");
    if(PlayerInfo[playerid][pJob] == 25 || PlayerInfo[playerid][pJob2] == 25)
    {
        print("2");
        new vehicleid = GetPlayerVehicleID(playerid);
        if(IsAOilTruckerCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            print("3");
            if(gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE || GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1)
            {
                print("4");
                if(GetProgressBarValue(OilLoadTruckBar[playerid]) > 10)
                {
                    SendClientMessageEx(playerid, COLOR_WHITE, "You are currently loading your Truck!");
                    return 1;
                }
                print("5");
                if(OilTruckUsed[playerid] != INVALID_VEHICLE_ID)
                {
                    SendClientMessageEx(playerid, COLOR_WHITE, "You are already on another delivery, type /cancel truck to cancel that delivery.");
                    return 1;
                }
                print("6");
                gPlayerCheckpointStatus[playerid] = CHECKPOINT_OilLOADTRUCK;
                SetPlayerCheckpoint(playerid,-1052.6180, -610.5533, 32.0078, 4);
                GameTextForPlayer(playerid, "~w~Waypoint set ~r~Oil Truck Depot", 5000, 1);
                SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Refill you truck to transport with your Truck at Oil Truck Depot (see checkpoint on radar).");
                print("7");
            }
            else
            {
                SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
                return 1;
            }
        }
        else
        {
            SendClientMessageEx(playerid, COLOR_GREY, "You are not driving a Oil Truck!");
            return 1;
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GREY, "You are not a Oil Trucker!");
        return 1;
    }
    return 1;
}
Try this with ID 1+ and tell me which number is displayed on the console.
Reply


Messages In This Thread
Command Only working for ID:0 [+rep for helping.] - by Sledgehammer - 02.01.2014, 13:18
Re: Command Only working for ID:0 - by Sledgehammer - 02.01.2014, 13:37
Re: Command Only working for ID:0 - by Sledgehammer - 02.01.2014, 14:15
Re: Command Only working for ID:0 - by erminpr0 - 02.01.2014, 15:42
Re: Command Only working for ID:0 - by Sledgehammer - 02.01.2014, 18:18
Re: Command Only working for ID:0 - by Seif- - 02.01.2014, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)