[Ajuda] Gm tucker ajuda e pedido
#1

@removido OBD: Le la embaixo
Reply
#2

Faz Isso !
pawn Код:
// Starts a job
COMMAND:trabalhar(playerid, params[])
{
    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/trabalhar", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        // First check if the player already has a job
        if (APlayerData[playerid][JobStarted] == false)
        {
            // Check the player's class
            switch (APlayerData[playerid][PlayerClass])
            {
                case ClassTruckDriver:
                {
                    // Get the id of the convoy (if the player is in a convoy)
                    new Convoy = APlayerData[playerid][ConvoyID];

                    // Check if the player is part of a convoy AND is not the leader
                    if ((APlayerData[playerid][InConvoy] == true) && (AConvoys[Convoy][Members][0] != playerid))
                    {
                        // Let the player know he's not the leader of his convoy and cannot start a job
                        SendClientMessage(playerid, 0xFF0000FF, "Voce nao e o Lider do Comboio, Voce nao pode Iniciar um Trabalho");
                        // Exit the function
                        return 1;
                    }

                    // A convoy-leader proceeds here, and also a normal player (no convoy-member)

                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid trucking vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleFlatbed, VehicleDFT30, VehicleCementTruck: // Flatbed, DFT-30, CementTruck
                                if (APlayerData[playerid][TruckerLicense] == 1) // Check if the player has acquired a truckers license
                                    ShowPlayerDialog(playerid, DialogTruckerJobMethod, DIALOG_STYLE_LIST, "Selecionar Metodo:", "Selecionar Entrega\r\nAuto Selecionar", "Selecionar", "Cancelar");
                                else
                                    Trucker_StartRandomJob(playerid); // Start a random job

                            case VehicleLineRunner, VehicleTanker, VehicleRoadTrain: // Player is driving a truck which needs a trailer
                                if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) // Check if there is a trailer attached
                                    if (APlayerData[playerid][TruckerLicense] == 1) // Check if the player has acquired a truckers license
                                        ShowPlayerDialog(playerid, DialogTruckerJobMethod, DIALOG_STYLE_LIST, "Selecionar Metodo:", "Selecionar Entrega\r\nAuto Selecionar", "Selecionar", "Cancelar");
                                    else
                                        Trucker_StartRandomJob(playerid); // Start a random job
                                else
                                    SendClientMessage(playerid, 0xFF0000FF, "Voce Precisa de um Trailer para Iniciar");

                            default: SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Caminhao");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Caminhao para Iniciar um Trabalho");
                }
                case ClassBusDriver:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                        if (GetVehicleModel(GetPlayerVehicleID(playerid)) == VehicleTaxi) // Check if the player is inside a valid busdriver vehicle
                            if (APlayerData[playerid][BusLicense] == 1) // Check if the player has acquired a busdriver license
                                ShowPlayerDialog(playerid, DialogBusJobMethod, DIALOG_STYLE_LIST, "Selecionar Metodo:", "Selecionar Linha\r\nAuto Selecionar", "Selecionar", "Cancelar");
                            else
                                BusDriver_StartJob(playerid, random(sizeof(ABusRoutes))); // Start a random job
                        else
                            SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Taxi");
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Taxi para Iniciar um Trabalho");
                }
                case ClassPilot:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid piloting vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleShamal, VehicleAt400, VehicleMaverick, VehicleCargobob: // Plane (Shamal), Plane (Nevada), helicopter (Maverick)
                                Pilot_StartRandomJob(playerid); // Start a random piloting job
                            default: SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Aviao");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Aviao Para iniciar um Trabalho");
                }
                case ClassMafia:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid piloting vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleSandKing, VehicleHuntley: // Sangking, Huntley
                                Mafia_StartRandomJob(playerid); // Start a random mafia job
                            default: SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo da Mafia");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo da Mafia para Iniciar um Trabalho");
                }
                case ClassCourier:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid courier vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleTrashmaster, VehicleFaggio, VehicleBenson: // Van (Burrito), bike (Faggio)
                                Courier_StartJob(playerid); // Start a random courier job
                            default: SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo do Caminhao de lixo");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo lixo para Iniciar um Trabalho");
                }
                case ClassRoadWorker:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid courier vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleUtilityVan, VehicleTowTruck: // Utility Van, Towtruck
                                Roadworker_StartRandomJob(playerid); // Start a random roadworker job
                            default: SendClientMessage(playerid, 0xFF0000FF, "You need to be the driver of a roadworker vehicle to start a job");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo do DNIT");
                }
                default: SendClientMessage(playerid, 0xFF0000FF, "Sua Classe nao faz todos os Trabalhos");
            }
        }
        else SendClientMessage(playerid, 0xFF0000FF, "Voce ja esta Realizando um Trabalho");
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by mau.tito
Посмотреть сообщение
Faz Isso !
pawn Код:
// Starts a job
COMMAND:trabalhar(playerid, params[])
{
    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/trabalhar", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        // First check if the player already has a job
        if (APlayerData[playerid][JobStarted] == false)
        {
            // Check the player's class
            switch (APlayerData[playerid][PlayerClass])
            {
                case ClassTruckDriver:
                {
                    // Get the id of the convoy (if the player is in a convoy)
                    new Convoy = APlayerData[playerid][ConvoyID];

                    // Check if the player is part of a convoy AND is not the leader
                    if ((APlayerData[playerid][InConvoy] == true) && (AConvoys[Convoy][Members][0] != playerid))
                    {
                        // Let the player know he's not the leader of his convoy and cannot start a job
                        SendClientMessage(playerid, 0xFF0000FF, "Voce nao e o Lider do Comboio, Voce nao pode Iniciar um Trabalho");
                        // Exit the function
                        return 1;
                    }

                    // A convoy-leader proceeds here, and also a normal player (no convoy-member)

                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid trucking vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleFlatbed, VehicleDFT30, VehicleCementTruck: // Flatbed, DFT-30, CementTruck
                                if (APlayerData[playerid][TruckerLicense] == 1) // Check if the player has acquired a truckers license
                                    ShowPlayerDialog(playerid, DialogTruckerJobMethod, DIALOG_STYLE_LIST, "Selecionar Metodo:", "Selecionar Entrega\r\nAuto Selecionar", "Selecionar", "Cancelar");
                                else
                                    Trucker_StartRandomJob(playerid); // Start a random job

                            case VehicleLineRunner, VehicleTanker, VehicleRoadTrain: // Player is driving a truck which needs a trailer
                                if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) // Check if there is a trailer attached
                                    if (APlayerData[playerid][TruckerLicense] == 1) // Check if the player has acquired a truckers license
                                        ShowPlayerDialog(playerid, DialogTruckerJobMethod, DIALOG_STYLE_LIST, "Selecionar Metodo:", "Selecionar Entrega\r\nAuto Selecionar", "Selecionar", "Cancelar");
                                    else
                                        Trucker_StartRandomJob(playerid); // Start a random job
                                else
                                    SendClientMessage(playerid, 0xFF0000FF, "Voce Precisa de um Trailer para Iniciar");

                            default: SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Caminhao");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Caminhao para Iniciar um Trabalho");
                }
                case ClassBusDriver:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                        if (GetVehicleModel(GetPlayerVehicleID(playerid)) == VehicleTaxi) // Check if the player is inside a valid busdriver vehicle
                            if (APlayerData[playerid][BusLicense] == 1) // Check if the player has acquired a busdriver license
                                ShowPlayerDialog(playerid, DialogBusJobMethod, DIALOG_STYLE_LIST, "Selecionar Metodo:", "Selecionar Linha\r\nAuto Selecionar", "Selecionar", "Cancelar");
                            else
                                BusDriver_StartJob(playerid, random(sizeof(ABusRoutes))); // Start a random job
                        else
                            SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Taxi");
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Taxi para Iniciar um Trabalho");
                }
                case ClassPilot:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid piloting vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleShamal, VehicleAt400, VehicleMaverick, VehicleCargobob: // Plane (Shamal), Plane (Nevada), helicopter (Maverick)
                                Pilot_StartRandomJob(playerid); // Start a random piloting job
                            default: SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Aviao");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Aviao Para iniciar um Trabalho");
                }
                case ClassMafia:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid piloting vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleSandKing, VehicleHuntley: // Sangking, Huntley
                                Mafia_StartRandomJob(playerid); // Start a random mafia job
                            default: SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo da Mafia");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo da Mafia para Iniciar um Trabalho");
                }
                case ClassCourier:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid courier vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleTrashmaster, VehicleFaggio, VehicleBenson: // Van (Burrito), bike (Faggio)
                                Courier_StartJob(playerid); // Start a random courier job
                            default: SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo do Caminhao de lixo");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo lixo para Iniciar um Trabalho");
                }
                case ClassRoadWorker:
                {
                    // Check if the player is the driver of a vehicle
                    if (GetPlayerVehicleSeat(playerid) == 0)
                    {
                        // Check if the player is inside a valid courier vehicle
                        switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
                        {
                            case VehicleUtilityVan, VehicleTowTruck: // Utility Van, Towtruck
                                Roadworker_StartRandomJob(playerid); // Start a random roadworker job
                            default: SendClientMessage(playerid, 0xFF0000FF, "You need to be the driver of a roadworker vehicle to start a job");
                        }
                    }
                    else
                        SendClientMessage(playerid, 0xFF0000FF, "Voce tem que Estar em Um Veiculo do DNIT");
                }
                default: SendClientMessage(playerid, 0xFF0000FF, "Sua Classe nao faz todos os Trabalhos");
            }
        }
        else SendClientMessage(playerid, 0xFF0000FF, "Voce ja esta Realizando um Trabalho");
    }
    return 1;
}
mau resolveu mais aparece mais erro
Reply
#4

Por acaso alguem teria uma gamemode de trucker sem nenhum erro em qualquer arquivo to com poblemas com uma da net dificil de resolver mais se alguem tiver disposto a me ajudar meu problema e sу com include!!!grato
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)