Command Only working for ID:0
#1

Command Only working for ID:0?
Hello, After all the attepts I have made so that everyone else can use this command other than ID:0 has failed. When your in game, and this command only works for ID:0 for some reason. I want this command to work for all ID's, not just ID:0. Please help me out.

pawn Код:
CMD:loadoil(playerid, params[])
{
    if(PlayerInfo[playerid][pJob] == 25 || PlayerInfo[playerid][pJob2] == 25)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(IsAOilTruckerCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE || GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1)
            {
                if(GetProgressBarValue(OilLoadTruckBar[playerid]) > 10)
                {
                    SendClientMessageEx(playerid, COLOR_WHITE, "You are currently loading your Truck!");
                    return 1;
                }
                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;
                }
                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).");
            }
            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;
}
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)