/load command bugged?
#1

why does this command not work? tells me "You can only deliver in a truck" when i am in on of the ComTruck Vechiles.

pawn Код:
//-----------------------------------------[Commerce Trucking]--------------------//
        if(strcmp(cmd, "/load", true) == 0)
    {
        if(PlayerInfo[playerid][pJob] == 26)
        {
            if(PlayerInfo[playerid][pTruckerCooldown] <= 0)
            {
                if(GetPVarInt(playerid, "Delivering") == 0)
                {
                    if(IsPlayerInRangeOfPoint(playerid, 8.0, 2484.2195,-2118.1204,13.5469))
                    {
                       if(GetPlayerVehicleID(playerid) >= ComTruck[0] && GetPlayerVehicleID(playerid) <= ComTruck[10])
                        {
                            if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                            {
                                if(GetPVarInt(playerid, "Loading") == 0)
                                {
                                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                                    SendClientMessage(playerid, LIGHTBLUE, "Please wait while the products are loaded onto the truck...");
                                    SetTimerEx("LoadProducts", 10000, false, "i", playerid);
                                    SetPVarInt(playerid, "Loading", 1);
                                    TogglePlayerControllable(playerid, 0);
                                    return 1;
                                }
                                else return SendClientMessage(playerid, GREY, "Please wait...");
                            }
                            else return SendClientMessage(playerid, GREY, "Wait.. where's the trailer? We need something to put the products inside.");
                        }
                        else return SendClientMessage(playerid, GREY, "    You can only deliver in a truck.");
                    }
                    else return SendClientMessage(playerid, GREY, "    You are not at the Los Santos Product Factory.");
                }
                else return SendClientMessage(playerid, GREY, "    You are already delivering products, either deliver it or /killcp.");
            }
            else return format(string, sizeof(string), "You still have %d seconds left before you can deliver more products.", PlayerInfo[playerid][pTruckerCooldown]), SendClientMessage(playerid, GREY, string);
        }
        else { SendClientMessage(playerid, GREY, "    You are not a trucker."); }
        return 1;
    }
Reply


Messages In This Thread
/load command bugged? - by Donvalley - 21.06.2013, 02:36
Re: /load command bugged? - by Kindred - 21.06.2013, 02:45
Re: /load command bugged? - by Donvalley - 21.06.2013, 03:05

Forum Jump:


Users browsing this thread: 2 Guest(s)