Szerző Téma: PPC modban nem működő dialog  (Megtekintve 913 alkalommal)

PPC modban nem működő dialog
« Dátum: 2018. December 28. - 20:08:55 »
0
Üdv! Van egy PPC modom még réges régen editeltem most újra elővettem. Sajnos azt tapasztaltam hogy egy dialog nem működik, a /housemenu (Aki nem ismeri a modot ez a parancs a házadban használható, megváltoztathatod a nevét, fejlesztheted, vehetsz kocsit, itt adhatod el stb.) Ez a parancs ugyebár egy dialógust hoz létre ami most teljesen az alap mert kicseréltem a házrendszert teljesen az utolsó sorig mindenhol az alapra. Nos, amíg nem lépünk be egy házba tökéletesen működik írja hogy nem vagyunk házban. Amint belépünk egy házba a dialógust megnyitja viszont az azon belül kiválasztható lista elemeket nem érzékeli/nem csinál semmit bármit választunk ki. Amit lehetett hogy ondialogresponse-nál return 0 legyen stb. próbáltam. Ennek ellenére sem működik. A Biznisz rendszer felépítése ugyanez csak van /busmenu parancs na azzal semmi baj nincs tökéletesen működik. A /housemenu parancsnál viszont nem fagy ki a player se a szerver se semmi minden másik parancs tökéletesen működik a teleportálásra szolgáló /rescue paranccsal ki is lehet jönni a házból és ugyanúgy lehet tovább játszani. De házon belül nem működik. A Dialog ID-jét sem használja más Dialog.
Mod elején a define
 

#define DialogHouseMenu             9000

 
A /housemenu parancs
 

// This command opens a menu when you\'re inside your house to allow to access the options of your house
COMMAND:housemenu(playerid, params[])
{
// Setup local variables
new OptionsList[200], DialogTitle[200];
// Send the command to all admins so they can see it
SendAdminText(playerid, \"/housemenu\", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
   // Check if the player is inside a house
   if (APlayerData[playerid][CurrentHouse] != 0)
   {
      format(DialogTitle, sizeof(DialogTitle), \"Select option for %s\", AHouseData[APlayerData[playerid][CurrentHouse]][HouseName]);
      format(OptionsList, sizeof(OptionsList), \"%sChange house-name\\n\", OptionsList);
      format(OptionsList, sizeof(OptionsList), \"%sUpgrade house\\n\", OptionsList);
      format(OptionsList, sizeof(OptionsList), \"%sBuy house-car\\n\", OptionsList);
      format(OptionsList, sizeof(OptionsList), \"%sBuy house-car insurance\\n\", OptionsList);
      format(OptionsList, sizeof(OptionsList), \"%sSell house-car\\n\", OptionsList);
      format(OptionsList, sizeof(OptionsList), \"%sSell house\\n\", OptionsList);
      format(OptionsList, sizeof(OptionsList), \"%sOpen house to the public\\n\", OptionsList);
      format(OptionsList, sizeof(OptionsList), \"%sClose house to the public\\n\", OptionsList);
      format(OptionsList, sizeof(OptionsList), \"%sExit house\\n\", OptionsList);
      // Show the housemenu
      ShowPlayerDialog(playerid, DialogHouseMenu, DIALOG_STYLE_LIST, DialogTitle, OptionsList, \"Select\", \"Cancel\");
   }
   else
       SendClientMessage(playerid, 0xFF0000FF, \"You\'re not inside a house\");
}
else
    return 0;
// Let the server know that this was a valid command
return 1;
}

 
OnDialogResponse alatti részen
 

case DialogHouseMenu: Dialog_HouseMenu(playerid, response, listitem); // Process the main housemenu

 
Dialog_HouseMenu
 

// This function processes the housemenu dialog
Dialog_HouseMenu(playerid, response, listitem)
{
// Just close the dialog if the player clicked \"Cancel\"
if(!response) return 1;
// Setup local variables
new UpgradeList[2000], HouseID, DialogTitle[200], Counter, UpgradePrice, Msg[128], CarSlot, VehicleClassList[1000], VehicleList[500];
// Get the HouseID of the house where the player is
HouseID = APlayerData[playerid][CurrentHouse];
// Select an option based on the selection in the list
switch(listitem)
{
    case 0: // Change house name
    {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
           format(DialogTitle, 200, TXT_DialogOldHouseName, AHouseData[HouseID][HouseName]);
         ShowPlayerDialog(playerid, DialogHouseNameChange, DIALOG_STYLE_INPUT, DialogTitle, TXT_DialogEnterNewHouseName, TXT_DialogButtonSelect, TXT_DialogButtonCancel);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
    }
    case 1: // Upgrade the house
    {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
           // Check if it\'s possible to upgrade further
         if (AHouseData[HouseID][HouseLevel] < AHouseData[HouseID][HouseMaxLevel])
         {
            // Add only the upgrades above the current house-level to the upgradelist
            for (new i = AHouseData[HouseID][HouseLevel] + 1; i <= AHouseData[HouseID][HouseMaxLevel]; i++)
            {
                Counter++; // Add 1 to the counter each time an upgrade is added to the upgradelist
                UpgradePrice = ((AHouseData[HouseID][HousePrice] * Counter) / 100) * HouseUpgradePercent;
                // Add the upgrade-info in green if the player can afford it, and in red if he cannot afford it
               if (APlayerData[playerid][PlayerMoney] >= UpgradePrice)
                  format(UpgradeList, 2000, \"%s{00FF00}%s (level %i)\\t\\t$%i\\n\", UpgradeList, AHouseInteriors[InteriorName], i, UpgradePrice);
               else
                  format(UpgradeList, 2000, \"%s{FF0000}%s (level %i)\\t\\t$%i\\n\", UpgradeList, AHouseInteriors[InteriorName], i, UpgradePrice);
            }
              // Show another dialog to let the player select which upgrade he wants for his house
            ShowPlayerDialog(playerid, DialogUpgradeHouse, DIALOG_STYLE_LIST, TXT_DialogSelectHouseUpgrade, UpgradeList, TXT_DialogButtonSelect, TXT_DialogButtonCancel);
         }
         else
             SendClientMessage(playerid, 0xFFFFFFFF, TXT_HouseReachedMaxLevel);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
    }
   case 2: // Buy house-car
   {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          // Find a free carslot
          CarSlot = House_GetFreeCarSlot(HouseID);
          // Check if the carslot is valid
          if (CarSlot != -1)
          {
             // Let the player choose a vehicle-class
            format(VehicleClassList, 1000, \"%s{00FF00}%s{FFFFFF}\\n\", VehicleClassList, \"Bikes\");
            format(VehicleClassList, 1000, \"%s{40FF00}%s{FFFFFF}\\n\", VehicleClassList, \"Boats\");
            format(VehicleClassList, 1000, \"%s{80FF00}%s{FFFFFF}\\n\", VehicleClassList, \"Convertibles\");
            format(VehicleClassList, 1000, \"%s{B0FF00}%s{FFFFFF}\\n\", VehicleClassList, \"Helicopters\");
            format(VehicleClassList, 1000, \"%s{FFFF00}%s{FFFFFF}\\n\", VehicleClassList, \"Industrial vehicles\");
            format(VehicleClassList, 1000, \"%s{B0FF40}%s{FFFFFF}\\n\", VehicleClassList, \"Low-riders\");
            format(VehicleClassList, 1000, \"%s{80FF80}%s{FFFFFF}\\n\", VehicleClassList, \"Off-Road vehicles\");
            format(VehicleClassList, 1000, \"%s{40FFB0}%s{FFFFFF}\\n\", VehicleClassList, \"Planes\");
            format(VehicleClassList, 1000, \"%s{00FFFF}%s{FFFFFF}\\n\", VehicleClassList, \"Public Service vehicles\");
            format(VehicleClassList, 1000, \"%s{00B0FF}%s{FFFFFF}\\n\", VehicleClassList, \"RC vehicles\");
            format(VehicleClassList, 1000, \"%s{0080FF}%s{FFFFFF}\\n\", VehicleClassList, \"Saloon vehicles\");
            format(VehicleClassList, 1000, \"%s{0040FF}%s{FFFFFF}\\n\", VehicleClassList, \"Sport vehicles\");
            format(VehicleClassList, 1000, \"%s{0000FF}%s{FFFFFF}\\n\", VehicleClassList, \"Station wagons\");
            format(VehicleClassList, 1000, \"%s{4000FF}%s{FFFFFF}\\n\", VehicleClassList, \"Trailers\");
            format(VehicleClassList, 1000, \"%s{8000FF}%s{FFFFFF}\\n\", VehicleClassList, \"Unique vehicles\");
            // Ask which vehicle class the player wants to see to buy a vehicle
            ShowPlayerDialog(playerid, DialogBuyCarClass, DIALOG_STYLE_LIST, TXT_DialogBuyCarSelectClass, VehicleClassList, TXT_DialogButtonSelect, TXT_DialogButtonCancel);
          }
          else
              SendClientMessage(playerid, 0xFFFFFFFF, TXT_HouseHasMaxVehicles);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
   }
   case 3: // Buy house-car insurance
   {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          new MsgInsurance[128];
          // Check if this house doesn\'t have insurance yet
          if (AHouseData[HouseID][Insurance] == 0)
          {
              // Check if the player can afford the insurance
              if (APlayerData[playerid][PlayerMoney] >= (AHouseData[HouseID][HousePrice] / 10))
              {
                // Construct the message for the dialog, this includes the price for the insurance
                format(MsgInsurance, 128, TXT_DialogBuyInsurance, AHouseData[HouseID][HousePrice] / 10);
               // Ask the player if the wants to buy an insurance for this house\'s vehicles
               ShowPlayerDialog(playerid, DialogBuyInsurance, DIALOG_STYLE_MSGBOX, TXT_DialogTitleBuyInsurance, MsgInsurance, TXT_DialogButtonYes, TXT_DialogButtonNo);
            }
            else
                SendClientMessage(playerid, 0xFFFFFFFF, TXT_CannotAffordInsurance);
         }
         else
             SendClientMessage(playerid, 0xFFFFFFFF, TXT_HouseAlreadyHasInsurance);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
   }
   case 4: // Sell house-car
   {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          new BuyableCarIndex, bool:HouseHasCars = false;
         // Check if the house has any cars assigned to it
         for (CarSlot = 0; CarSlot < 10; CarSlot++)
             if (AHouseData[HouseID][VehicleIDs][CarSlot] != 0)
                 HouseHasCars = true;
         // Check if the house has any cars assigned to it
         if (HouseHasCars == true)
         {
            // Add all vehicles to the list
            for (CarSlot = 0; CarSlot < 10; CarSlot++)
            {
               if (AHouseData[HouseID][VehicleIDs][CarSlot] != 0)
               {
                   // Get the index where the first vehicle is found in the ABuyableVehicles array
                   BuyableCarIndex = VehicleBuyable_GetIndex(GetVehicleModel(AHouseData[HouseID][VehicleIDs][CarSlot]));
                   // Add the name of the vehicle to the list
                   format(VehicleList, 500, \"%s{00FF00}%s: $%i{FFFFFF}\\n\", VehicleList, ABuyableVehicles[BuyableCarIndex][CarName], ABuyableVehicles[BuyableCarIndex][Price] / 2);
               }
               else
                  format(VehicleList, 500, TXT_EmptyCarSlot, VehicleList);
            }
            // Ask which vehicle class the player wants to see to buy a vehicle
            ShowPlayerDialog(playerid, DialogSellCar, DIALOG_STYLE_LIST, TXT_SelectVehicleToSell, VehicleList, TXT_DialogButtonSelect, TXT_DialogButtonCancel);
         }
         else
             SendClientMessage(playerid, 0xFFFFFFFF, TXT_NoHouseVehicles);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
   }
   case 5: // Sell house
   {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          // Setup local variables
          new bool:HouseHasCars = false;
         // Check if the house has any cars assigned to it
         for (CarSlot = 0; CarSlot < 10; CarSlot++)
             if (AHouseData[HouseID][VehicleIDs][CarSlot] != 0)
                 HouseHasCars = true;
         // Check if all house-cars have been sold (all slots are empty)
         if (HouseHasCars == false)
         {
             format(Msg, 128, TXT_SureSellHouse, House_CalcSellPrice(HouseID));
            ShowPlayerDialog(playerid, DialogSellHouse, DIALOG_STYLE_MSGBOX, TXT_AreYouSure, Msg, TXT_DialogButtonYes, TXT_DialogButtonNo);
         }
         else
             SendClientMessage(playerid, 0xFFFFFFFF, TXT_CannotSellHouseWithCars);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
   }
    case 6: // Open the house to the public (everyone can enter it)
    {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          // Open the house to the public
         AHouseData[HouseID][HouseOpened] = true;
         // Let the player know he opened the house to the public
         SendClientMessage(playerid, 0xFFFFFFFF, \"{00FF00}You\'ve opened the house to the public, anyone can enter it\");
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
    }
    case 7: // Close the house to the public (only the owner can enter it)
    {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          // Close the house to the public
         AHouseData[HouseID][HouseOpened] = false;
         // Let the player know he closed the house to the public
         SendClientMessage(playerid, 0xFFFFFFFF, \"{00FF00}You\'ve closed the house to the public, only you can enter it\");
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
    }
    case 8:
    {
      House_Exit(playerid, HouseID);
    }
}
return 1;
}

 
A módba semmilyen olyan dolog nem került be ami piszkálná a házrendszert. Lehetséges hibákat keresek hátha valamit elnéztem. Ha van valami \"diagnózisotok\" szívesen meghallgatom!
Ha valamit még másolni kell szóljatok!
Köszönöm előre is!

PPC modban nem működő dialog
« Válasz #1 Dátum: 2018. December 28. - 22:47:48 »
0
ez már egy elég régi cucc, használd Gagi házrendszerét, ami sokkal jobb és könnyebben konfigurálható, vagy pedig válts át MySQL-re, aztán próbálkozz meg rootcause házrendszerével, de viszont ha te mindenáron ennél maradnál akkor 
 

   if(!response) return 1;
// Setup local variables
new UpgradeList[2000], HouseID, DialogTitle[200], Counter, UpgradePrice, Msg[128], CarSlot, VehicleClassList[1000], VehicleList[500];
// Get the HouseID of the house where the player is
HouseID = APlayerData[playerid][CurrentHouse];
// Select an option based on the selection in the list
switch(listitem)
{
    case 0: // Change house name
    {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
           format(DialogTitle, 200, TXT_DialogOldHouseName, AHouseData[HouseID][HouseName]);
         ShowPlayerDialog(playerid, DialogHouseNameChange, DIALOG_STYLE_INPUT, DialogTitle, TXT_DialogEnterNewHouseName, TXT_DialogButtonSelect, TXT_DialogButtonCancel);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
    }
    case 1: // Upgrade the house
    {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
           // Check if it\'s possible to upgrade further
         if (AHouseData[HouseID][HouseLevel] < AHouseData[HouseID][HouseMaxLevel])
         {
            // Add only the upgrades above the current house-level to the upgradelist
            for (new i = AHouseData[HouseID][HouseLevel] + 1; i <= AHouseData[HouseID][HouseMaxLevel]; i++)
            {
                Counter++; // Add 1 to the counter each time an upgrade is added to the upgradelist
                UpgradePrice = ((AHouseData[HouseID][HousePrice] * Counter) / 100) * HouseUpgradePercent;
                // Add the upgrade-info in green if the player can afford it, and in red if he cannot afford it
               if (APlayerData[playerid][PlayerMoney] >= UpgradePrice)
                  format(UpgradeList, 2000, \"%s{00FF00}%s (level %i)\\t\\t$%i\\n\", UpgradeList, AHouseInteriors[InteriorName], i, UpgradePrice);
               else
                  format(UpgradeList, 2000, \"%s{FF0000}%s (level %i)\\t\\t$%i\\n\", UpgradeList, AHouseInteriors[InteriorName], i, UpgradePrice);
            }
              // Show another dialog to let the player select which upgrade he wants for his house
            ShowPlayerDialog(playerid, DialogUpgradeHouse, DIALOG_STYLE_LIST, TXT_DialogSelectHouseUpgrade, UpgradeList, TXT_DialogButtonSelect, TXT_DialogButtonCancel);
         }
         else
             SendClientMessage(playerid, 0xFFFFFFFF, TXT_HouseReachedMaxLevel);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
    }
   case 2: // Buy house-car
   {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          // Find a free carslot
          CarSlot = House_GetFreeCarSlot(HouseID);
          // Check if the carslot is valid
          if (CarSlot != -1)
          {
             // Let the player choose a vehicle-class
            format(VehicleClassList, 1000, \"%s{00FF00}%s{FFFFFF}\\n\", VehicleClassList, \"Bikes\");
            format(VehicleClassList, 1000, \"%s{40FF00}%s{FFFFFF}\\n\", VehicleClassList, \"Boats\");
            format(VehicleClassList, 1000, \"%s{80FF00}%s{FFFFFF}\\n\", VehicleClassList, \"Convertibles\");
            format(VehicleClassList, 1000, \"%s{B0FF00}%s{FFFFFF}\\n\", VehicleClassList, \"Helicopters\");
            format(VehicleClassList, 1000, \"%s{FFFF00}%s{FFFFFF}\\n\", VehicleClassList, \"Industrial vehicles\");
            format(VehicleClassList, 1000, \"%s{B0FF40}%s{FFFFFF}\\n\", VehicleClassList, \"Low-riders\");
            format(VehicleClassList, 1000, \"%s{80FF80}%s{FFFFFF}\\n\", VehicleClassList, \"Off-Road vehicles\");
            format(VehicleClassList, 1000, \"%s{40FFB0}%s{FFFFFF}\\n\", VehicleClassList, \"Planes\");
            format(VehicleClassList, 1000, \"%s{00FFFF}%s{FFFFFF}\\n\", VehicleClassList, \"Public Service vehicles\");
            format(VehicleClassList, 1000, \"%s{00B0FF}%s{FFFFFF}\\n\", VehicleClassList, \"RC vehicles\");
            format(VehicleClassList, 1000, \"%s{0080FF}%s{FFFFFF}\\n\", VehicleClassList, \"Saloon vehicles\");
            format(VehicleClassList, 1000, \"%s{0040FF}%s{FFFFFF}\\n\", VehicleClassList, \"Sport vehicles\");
            format(VehicleClassList, 1000, \"%s{0000FF}%s{FFFFFF}\\n\", VehicleClassList, \"Station wagons\");
            format(VehicleClassList, 1000, \"%s{4000FF}%s{FFFFFF}\\n\", VehicleClassList, \"Trailers\");
            format(VehicleClassList, 1000, \"%s{8000FF}%s{FFFFFF}\\n\", VehicleClassList, \"Unique vehicles\");
            // Ask which vehicle class the player wants to see to buy a vehicle
            ShowPlayerDialog(playerid, DialogBuyCarClass, DIALOG_STYLE_LIST, TXT_DialogBuyCarSelectClass, VehicleClassList, TXT_DialogButtonSelect, TXT_DialogButtonCancel);
          }
          else
              SendClientMessage(playerid, 0xFFFFFFFF, TXT_HouseHasMaxVehicles);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
   }
   case 3: // Buy house-car insurance
   {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          new MsgInsurance[128];
          // Check if this house doesn\'t have insurance yet
          if (AHouseData[HouseID][Insurance] == 0)
          {
              // Check if the player can afford the insurance
              if (APlayerData[playerid][PlayerMoney] >= (AHouseData[HouseID][HousePrice] / 10))
              {
                // Construct the message for the dialog, this includes the price for the insurance
                format(MsgInsurance, 128, TXT_DialogBuyInsurance, AHouseData[HouseID][HousePrice] / 10);
               // Ask the player if the wants to buy an insurance for this house\'s vehicles
               ShowPlayerDialog(playerid, DialogBuyInsurance, DIALOG_STYLE_MSGBOX, TXT_DialogTitleBuyInsurance, MsgInsurance, TXT_DialogButtonYes, TXT_DialogButtonNo);
            }
            else
                SendClientMessage(playerid, 0xFFFFFFFF, TXT_CannotAffordInsurance);
         }
         else
             SendClientMessage(playerid, 0xFFFFFFFF, TXT_HouseAlreadyHasInsurance);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
   }
   case 4: // Sell house-car
   {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          new BuyableCarIndex, bool:HouseHasCars = false;
         // Check if the house has any cars assigned to it
         for (CarSlot = 0; CarSlot < 10; CarSlot++)
             if (AHouseData[HouseID][VehicleIDs][CarSlot] != 0)
                 HouseHasCars = true;
         // Check if the house has any cars assigned to it
         if (HouseHasCars == true)
         {
            // Add all vehicles to the list
            for (CarSlot = 0; CarSlot < 10; CarSlot++)
            {
               if (AHouseData[HouseID][VehicleIDs][CarSlot] != 0)
               {
                   // Get the index where the first vehicle is found in the ABuyableVehicles array
                   BuyableCarIndex = VehicleBuyable_GetIndex(GetVehicleModel(AHouseData[HouseID][VehicleIDs][CarSlot]));
                   // Add the name of the vehicle to the list
                   format(VehicleList, 500, \"%s{00FF00}%s: $%i{FFFFFF}\\n\", VehicleList, ABuyableVehicles[BuyableCarIndex][CarName], ABuyableVehicles[BuyableCarIndex][Price] / 2);
               }
               else
                  format(VehicleList, 500, TXT_EmptyCarSlot, VehicleList);
            }
            // Ask which vehicle class the player wants to see to buy a vehicle
            ShowPlayerDialog(playerid, DialogSellCar, DIALOG_STYLE_LIST, TXT_SelectVehicleToSell, VehicleList, TXT_DialogButtonSelect, TXT_DialogButtonCancel);
         }
         else
             SendClientMessage(playerid, 0xFFFFFFFF, TXT_NoHouseVehicles);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
   }
   case 5: // Sell house
   {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          // Setup local variables
          new bool:HouseHasCars = false;
         // Check if the house has any cars assigned to it
         for (CarSlot = 0; CarSlot < 10; CarSlot++)
             if (AHouseData[HouseID][VehicleIDs][CarSlot] != 0)
                 HouseHasCars = true;
         // Check if all house-cars have been sold (all slots are empty)
         if (HouseHasCars == false)
         {
             format(Msg, 128, TXT_SureSellHouse, House_CalcSellPrice(HouseID));
            ShowPlayerDialog(playerid, DialogSellHouse, DIALOG_STYLE_MSGBOX, TXT_AreYouSure, Msg, TXT_DialogButtonYes, TXT_DialogButtonNo);
         }
         else
             SendClientMessage(playerid, 0xFFFFFFFF, TXT_CannotSellHouseWithCars);
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
   }
    case 6: // Open the house to the public (everyone can enter it)
    {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          // Open the house to the public
         AHouseData[HouseID][HouseOpened] = true;
         // Let the player know he opened the house to the public
         SendClientMessage(playerid, 0xFFFFFFFF, \"{00FF00}You\'ve opened the house to the public, anyone can enter it\");
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
    }
    case 7: // Close the house to the public (only the owner can enter it)
    {
      // Only the house-owner can use this option
      if (House_PlayerIsOwner(playerid, HouseID) == 1)
      {
          // Close the house to the public
         AHouseData[HouseID][HouseOpened] = false;
         // Let the player know he closed the house to the public
         SendClientMessage(playerid, 0xFFFFFFFF, \"{00FF00}You\'ve closed the house to the public, only you can enter it\");
      }
      else
          SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Only the house-owner can use this option\");
    }
    case 8:
    {
      House_Exit(playerid, HouseID);
    }
}
return 1;
}

 
csak simán ezt rakd be alá, nekem ez működött mikor próbáltam(7 éve kb. xD), és töröld a  
 

Dialog_HouseMenu(playerid, response, listitem)

 
-et a
 

case DialogHouseMenu: Dialog_HouseMenu(playerid, response, listitem); // Process the main housemenu

 
-val együtt, ha nem működik írj ide vissza, bár szerintem fog mert nekem működött
 
 

PPC modban nem működő dialog
« Válasz #2 Dátum: 2018. December 29. - 14:26:41 »
0
Hát megtettem, viszont Sapwnolás után \"Server closed the connection.\" Valamit elrontottam sajnos pont el kell mennem itthonról de ha hazajöttem megnézem mit ronthattam el. Valószínűleg olyat tettem kommentbe amit nem kellett volna így probléma van a player spawnoláskor amikor átfuttatja az összes házat hogy mik tartoznak hozzá. Köszönöm a segítséget hazaértem megpróbálom megcsinálni úgy hogy meg is nézhessem működik-e addig bárkinek van másik tippje szívesen meghallgatom! Köszönöm előre is!

PPC modban nem működő dialog
« Válasz #3 Dátum: 2018. December 29. - 21:06:34 »
0
Mégse volt rosszul berakva valami miatt kidob a szerver, de csak a playert egyből spawnolásnál. Lehet én rontok el valamit 1.5 éve nem nyúltam hozzá a módhoz na meg semmilyen módhoz :D Viszont hibát így se találtam. Esetleg valami más ötlet vagy pontosabban leírod mit hova lehet én nézek el valamit. 

PPC modban nem működő dialog
« Válasz #4 Dátum: 2018. December 30. - 06:37:02 »
0
bemész a játékba és /rcon exit

PPC modban nem működő dialog
« Válasz #5 Dátum: 2018. December 30. - 09:05:56 »
0
Bejelentkezés előtt nem tudok parancsot használni, spawnolásnál kifagy alapból a játékos miért kell /rcon exit ami le is állítja a szervert?
 
Sikerült megcsinálni a spawnolást és úgy van bent ahogyan te írtad hogy legyen viszont még mindig az alap probléma áll fent. /housemenu nem működik.
« Utoljára szerkesztve: 2018. December 30. - 09:16:06 írta DjDorgo »

PPC modban nem működő dialog
« Válasz #6 Dátum: 2019. Január 02. - 14:20:05 »
0
Gagi-ét használd, az jobb

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal