public void OnDialogResponse(object sender, Dialog.OnDialogResponseEventArgs args)
 {
     if (String.Compare("Vehicles", args.dialog.Name) == 0) // comparing name :/
     {
         if (args.response == 0) { return; }
         SpawnVehicle(args.player, args.listitem);
     }
 }
 public void SendVehicleDialog(Player pl)
 {
     API.Dialog d = new Dialog();
     d.Name = "Vehicles";
     d.Style = 2;
     d.Button1 = "Spawn";
     d.Button2 = "Close";
     d.Info = "";
     for (int i = 0; i < Vehicles.Length; i++)
     {
         d.Info += Vehicles[i].Name + "\r\n";
     }
     d.ShowDialogForPlayer(pl);
 }
Example #3
0
 public OnDialogResponseEventArgs(Player pl, Dialog d,int respons, int item, string input)
 {
     player = pl;
     dialog = d;
     response = respons;
     listitem = item;
     inputtext = input;
 }
Example #4
0
 /*public Menu GetPlayerMenu()
 {
     return Menu.GetMenuByID(NativeFunctionRequestor.RequestFunctionWithArgs("GetPlayerMenu", "i", ID));
 }*/
 public void ShowDialog(Dialog d)
 {
     NativeFunctionRequestor.RequestFunctionWithArgs("ShowPlayerDialog", "iiissss", ID, d.ID, d.Style, d.Name, d.Info, d.Button1, d.Button2);
     dialog = d;
 }