[Ajuda] PPC_Trucking
#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


Messages In This Thread
PPC_Trucking - by comanfiss - 25.04.2014, 12:51
Re: PPC_Trucking - by iMix - 25.04.2014, 13:11
Re: PPC_Trucking - by comanfiss - 25.04.2014, 15:33
Re: PPC_Trucking - by Locky_ - 25.04.2014, 17:13
Re: PPC_Trucking - by comanfiss - 25.04.2014, 19:29

Forum Jump:


Users browsing this thread: 1 Guest(s)