SA-MP Forums Archive
How can I change this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How can I change this? (/showthread.php?tid=649166)



How can I change this? - RayanIbrahim - 04.02.2018

Well, How can I change this type of Popup dialog into a basic dialog form?
Код:
CMD:lcm(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 2) {
        if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"ERROR: You already have a car.");
        else { ShowMenuForPlayer(LCars,playerid); return TogglePlayerControllable(playerid,false);  }
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this commandd");
}
Код:
  LCars = CreateMenu("~b~LethaL ~g~Cars", 2,  55.0, 150.0, 100.0, 80.0);
  SetMenuColumnHeader(LCars, 0, "Choose a car");
  AddMenuItem(LCars, 0, "Turismo");
  AddMenuItem(LCars, 0, "Bandito");
  AddMenuItem(LCars, 0, "Vortex");
  AddMenuItem(LCars, 0, "NRG");
  AddMenuItem(LCars, 0, "S.W.A.T");
  AddMenuItem(LCars, 0, "Hunter");
  AddMenuItem(LCars, 0, "Jetmax (boat)");
  AddMenuItem(LCars, 0, "Rhino");
  AddMenuItem(LCars, 0, "Monster Truck");
  AddMenuItem(LCars, 0, "Sea Sparrow");
  AddMenuItem(LCars, 0, "More");
  AddMenuItem(LCars, 0, "Return");

  LCars2 = CreateMenu("~b~LethaL ~g~Cars", 2,  55.0, 150.0, 100.0, 80.0);
  SetMenuColumnHeader(LCars2, 0, "Choose a car");
  AddMenuItem(LCars2, 0, "Dumper");
  AddMenuItem(LCars2, 0, "RC Tank");
  AddMenuItem(LCars2, 0, "RC Bandit");
  AddMenuItem(LCars2, 0, "RC Baron");
  AddMenuItem(LCars2, 0, "RC Goblin");
  AddMenuItem(LCars2, 0, "RC Raider");
  AddMenuItem(LCars2, 0, "RC Cam");
  AddMenuItem(LCars2, 0, "Tram");
  AddMenuItem(LCars2, 0, "Return");

Into this something like this Dialog.



Re: How can I change this? - ShadowMortar - 04.02.2018

https://sampwiki.blast.hk/wiki/ShowPlayerDialog


Re: How can I change this? - Mugala - 04.02.2018

you must use ShowPlayerDialog instead of Menus and also u must change the scripts from callback to another callback - OnDialogResposne.


Re: How can I change this? - PepsiCola23 - 04.02.2018

PHP код:
ShowPlayerDialog 
with this style
PHP код:
DIALOG_STYLE_LIST