[Ajuda] PPC_Trucking
#1

Gente to com uns pequenos Player esperto q usa o comando /irparacasa quando ta trabalhando se alguem poder me ajuda eu queria q esse comando /irparacasa nao pegase quando ta em trabalho ....alguem sabe?agradeзo ajuda



pawn Код:
// This command teleports you to your selected house
COMMAND:irparacasa(playerid, params[])
{
    // Setup local variables
    new HouseList[1000];

    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/irparacasa", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        // Check if the player has a wanted level of less than 3
        if (GetPlayerWantedLevel(playerid) < 3)
        {
            // Check if the player is not jailed
            if (APlayerData[playerid][PlayerJailed] == 0)
            {
                // Check if the player is not inside a vehicle
                if (GetPlayerVehicleID(playerid) == 0)
                {
                    // Ask to which house the player wants to add his vehicle
                    for (new i; i < MAX_HOUSESPERPLAYER; i++)
                    {
                        // Check if this houseindex is occupied
                        if (APlayerData[playerid][Houses][i] != 0)
                            format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
                        else
                            format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot Vazio");
                    }
                    ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "Choose the house to go to:", HouseList, "Selecionar", "Cancelar");
                }
                else
                    SendClientMessage(playerid, 0xFF0000FF, "Voce Precisa estar a pe para ir a Sua Casa");
            }
            else
                SendClientMessage(playerid, 0xFF0000FF, "Voce nao pode usar /irparacasa Preso");
        }
        else
            SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Voce nao pode usar /irparacasa quando esta sendo Procurado");
    }
    else
        return 0;

    // Let the server know that this was a valid command
    return 1;
}
Reply
#2

pawn Код:
// This command teleports you to your selected house
COMMAND:irparacasa(playerid, params[])
{
    // Setup local variables
    new HouseList[1000];

    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/irparacasa", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        // Check if the player has a wanted level of less than 3
        if (GetPlayerWantedLevel(playerid) < 3)
        {
            // Check if the player is not jailed
            if (APlayerData[playerid][PlayerJailed] == 0)
            {
                // Check if the player is not inside a vehicle
                if (GetPlayerVehicleID(playerid) == 0)
                {
          if (APlayerData[playerid][JobStarted] == false)

                    // Ask to which house the player wants to add his vehicle
                    for (new i; i < MAX_HOUSESPERPLAYER; i++)
                    {
                        // Check if this houseindex is occupied
                        if (APlayerData[playerid][Houses][i] != 0)
                            format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
                        else
                            format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot Vazio");
                    }
                    ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "Choose the house to go to:", HouseList, "Selecionar", "Cancelar");
                }
                else
                    SendClientMessage(playerid, 0xFF0000FF, "Voce Precisa estar a pe para ir a Sua Casa");
            }
            else
                SendClientMessage(playerid, 0xFF0000FF, "Voce nao pode usar /irparacasa Preso");
        }
        else
            SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Voce nao pode usar /irparacasa quando esta sendo Procurado");
 }
        else
        SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar '/irparacasa' quando vocк estiver trabalhando.");
   }
    else
        return 1;
}
Ve se vai ae..
Reply
#3

deu esse ERRO...

pawn Код:
C:\Users\Pedro\Desktop\BTM v1.3\pawno\include\PPC_PlayerCommands.inc(774) : warning 217: loose indentation
C:\Users\Pedro\Desktop\BTM v1.3\pawno\include\PPC_PlayerCommands.inc(788) : error 010: invalid function or declaration
C:\Users\Pedro\Desktop\BTM v1.3\pawno\include\PPC_PlayerCommands.inc(789) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

linha 774
pawn Код:
ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "Choose the house to go to:", HouseList, "Selecionar", "Cancelar");
linha 788 e 789
pawn Код:
else
        return 1;
Reply
#4

Quote:
Originally Posted by comanfiss
Посмотреть сообщение
Gente to com uns pequenos Player esperto q usa o comando /irparacasa quando ta trabalhando se alguem poder me ajuda eu queria q esse comando /irparacasa nao pegase quando ta em trabalho ....alguem sabe?agradeзo ajuda



pawn Код:
// This command teleports you to your selected house
COMMAND:irparacasa(playerid, params[])
{
    // Setup local variables
    new HouseList[1000];

    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/irparacasa", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        // Check if the player has a wanted level of less than 3
        if (GetPlayerWantedLevel(playerid) < 3)
        {
            // Check if the player is not jailed
            if (APlayerData[playerid][PlayerJailed] == 0)
            {
                // Check if the player is not inside a vehicle
                if (GetPlayerVehicleID(playerid) == 0)
                {
                    // Ask to which house the player wants to add his vehicle
                    for (new i; i < MAX_HOUSESPERPLAYER; i++)
                    {
                        // Check if this houseindex is occupied
                        if (APlayerData[playerid][Houses][i] != 0)
                            format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
                        else
                            format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot Vazio");
                    }
                    ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "Choose the house to go to:", HouseList, "Selecionar", "Cancelar");
                }
                else
                    SendClientMessage(playerid, 0xFF0000FF, "Voce Precisa estar a pe para ir a Sua Casa");
            }
            else
                SendClientMessage(playerid, 0xFF0000FF, "Voce nao pode usar /irparacasa Preso");
        }
        else
            SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Voce nao pode usar /irparacasa quando esta sendo Procurado");
    }
    else
        return 0;

    // Let the server know that this was a valid command
    return 1;
}
Optmizando e adicionando o bloqueio.
pawn Код:
COMMAND:irparacasa(playerid, params[])
{
    new HouseList[1000];
    SendAdminText(playerid, "/irparacasa", params);
    if (APlayerData[playerid][LoggedIn] == false) return 0;
    if (GetPlayerWantedLevel(playerid) >= 3) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Voce nao pode usar /irparacasa quando esta sendo Procurado");
    if (APlayerData[playerid][PlayerJailed] != 0) return SendClientMessage(playerid, 0xFF0000FF, "Voce nao pode usar /irparacasa Preso");
    if (GetPlayerVehicleID(playerid) != 0) return SendClientMessage(playerid, 0xFF0000FF, "Voce Precisa estar a pe para ir a Sua Casa");
    if(APlayerData[playerid][JobStarted] == true) return SendClientMessage(playerid, 0xFF0000FF, "Vocк deve usar sem estar em um trabalho!");
    for (new i; i < MAX_HOUSESPERPLAYER; i++) {
        if (APlayerData[playerid][Houses][i] != 0)
            format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
        else
            format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Slot Vazio");
    }
    ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "Choose the house to go to:", HouseList, "Selecionar", "Cancelar");
    return 1;
}
^^
Reply
#5

OBG cara muito obrigado vlw mesmo....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)