Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/28/20 in all areas

  1. Summary: This script helps to get input easily in Client-Side with C#. Download: BasicInput.cs (github.com) Usage: // Just get input. BasicInput.GetInput((input) => { Chat.Output("Your message is: " + input); }); //------------- // Get input with Title & Maxlength BasicInput.GetInput((input) => { Chat.Output("Your message is: " + input); }, "Type your message:", 32); //------------- // Get input with existing text: BasicInput.GetInput((input) => { Chat.Output("Your message is: " + input); }, "Type your message:", 32, "Old Message"); // -------------- // Also can get 2 parameters to get state of input. BasicInput.GetInput((input, state) => { if (state == BasicInput.InputResultState.Canceled) { Chat.Output("Input Canceled!"); } if (state == BasicInput.InputResultState.Completed) { Chat.Output("Input completed successfully and mesasge is " + input); } });
    2 points
  2. Remove bin and obj folders, they could cause weird issues and it's probably the cause of those errors.
    1 point
  3. Talepleriniz bizim için önemli! Pillbox Medical Department uzun bir süreden sonra yenilenen kadrosuyla tekrardan aktif! Sizler de başvurmak isterseniz aşağıdaki bölüme göz gezdirin! https://forum.sevenroleplay.com/topic/1631-pillbox-hill-medical-center-örnek-başvuru-formu/ Aynı zamanda Future V2 Videomuzu da izlemeyi unutma!
    1 point
  4. Version 1.2

    229 downloads

    DavWebCreator DavWebCreator is a C# class 'library' which provides you the possibility to generate HTML structures with according styles and logic behind each element. There are already plenty of examples online here: https://DavWebCreator.com But anyway I will provide you here at least one example 🙂 Compatible with 1.1.0.0 If you want to report a bug or just want some help join my discord: https://discord.gg/JYNDrSh Preview Code behind: [Command("yesno")] public void YesNoDialogExample(Client player) { // Generate the Browser Browser browser = new Browser("YesNoDialog", BrowserType.Custom, BrowserContentAlign.Center, "520px", "100%"); // Create the dialog. (Most of the elements will get a default value) var yesNoDialog = browser.GetYesNoDialog("YES_NO_EXAMPLE", "Character Deletion", "WARNING", "Do you really want to delete your character?", "Yes", "No"); // Customize for example the font size and the margin. yesNoDialog.Card.ContentTitle.FontSize = "30px"; yesNoDialog.Card.Margin = "33% 0 0 0"; // Add to the browser browser.AddYesNoDialog(yesNoDialog); // Finally open the browser for the desire player. browser.OpenBrowser(player); } //This event will be called when a button was clicked. [RemoteEvent("YES_NO_EXAMPLE")] public void YesNoExample(Client player, params object[] args) { if (args == null) return; // This is just a list of reponses. (You can bind for example 3 textboxes to a button and when someone click on that button, all 3 binded textboxes will be in the response, with their hidden values. List<BrowserEventResponse> responses = JsonConvert.DeserializeObject<List<BrowserEventResponse>>(args[0].ToString()); // For some reason we know that a YesNoDialog only gives you one response, because only the clicked button will be returned. BrowserEventResponse buttonResponse = responses[0]; player.SendChatMessage(buttonResponse.Value + " Clicked"); player.SendChatMessage(buttonResponse.HiddenValue + " This is our secret hidden value. e.g. some id"); // Close the browser player.TriggerEvent("CLOSE_BROWSER"); // Do stuff } Installation Download the .rar Open the "DavWebCreator_Installation.rar" and open the directory called "DavWebCreator_GetStarted". Open the directory "Server Resources" and Copy and paste the directory "DavWebCreator" in to your"Visual Studio" server project. Go back to the directory called "DavWebCreator_GetStarted". Now open the directory "Client Resources" and Copy and paste the directory "DavWebCreator" in to your "Visual Studio" client project. Your solution should now look like this. 6. Go back to the directory called"DavWebCreator_GetStarted". 7. Now open the directory "Client Frontend" and copy and paste the directory "DavWebCreator" in to your RageMp "client_packages" directory. This is how it should look now: Done. Lets start with some examples… The project stays under the MIT license, feel free to contribute: https://github.com/davidowiz/DavWebBrowser 🙂 Maybe the installation procedure will be improved. But as you all now, time is limited. Best regards, Davidowiz
    1 point
    Very nice! I've converted the server-side JS code to a C# equivalent for those interested: https://github.com/DingoDongBlueBalls/EfficientAttachmentSyncCSharp
    1 point
×
×
  • Create New...