Jump to content
RAGE Multiplayer Community

Search the Community

Showing results for tags 'csharp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
    • RDR2 Multiplayer
  • Scripting
    • Scripting
    • Resources
  • Community
    • Support
    • Servers
    • Media Gallery
  • Non-English
    • Русский - Russian
    • Français - French
    • Deutsch - German
    • Espanol - Spanish
    • Română - Romanian
    • Portuguesa - Portuguese
    • Polski - Polish

Categories

  • Scripts
  • Gamemodes
  • Libraries
  • Plugins
  • Maps
  • Tools

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Facebook


Youtube


Skype


Web


VK

  1. this is deprecated https://wiki.gtanet.work/index.php?title=C.Register ?? How to get args from command? this is not working namespace myresourcename { public static class Commands // Make sure to not inherit Script class in order to avoid registering the command on stratup { [Command] // Don't forget to add the Command Attribute //public static void TestCmd(Player player) // working public static void TestCmd(Player player, string args) // not working { NAPI.Util.ConsoleOutput("TestCommand Invoked!"); } } public c
  2. Version 2.0

    10502 downloads

    Hello everybody. Some weeks ago i made a post on this forum's spanish section releasing my old gamemode, which I have been porting to RAGE:MP right after the bridge was released for the first time. In the beginning it was only in spanish, so I didn't thought it was a good idea to release to the whole community, as not so many people here speak spanish (I guess) but, after seeing that more people than I had expected downloaded it and also taking the suggestion George made me, I decided to start translating it and also, allowing to be multilanguage in a future. That above is the main reason
  3. Hello everyone! Many of you have decided to use Entity Framework instead of raw SQL but failed somehow in the process (myself included)! This is why I am creating this quick guide with some examples on how to use Entity Framework Core with MySQL database in RAGEMP C# gamemode. It's not perfect, but it will work just fine. If you find a mistake or have a better way of doing something, please let me know! Let's start! Requirements: - Visual Studio 17 or better - Net Core 2.2 - RageMP C# 0.3.7 - MySQL database (I use XAMPP) 1. First, you will need
  4. Nothing happens, the value changes but does not apply. When you exit and then enter the stream of the vehicle, the handling value that I set before is reset to default. public void SetVehicleHandling(object[] args) { string key = args[0].ToString(); float val = Convert.ToSingle(args[1]); Chat.Output($"OLD: {RAGE.Elements.Player.LocalPlayer.Vehicle.GetHandlingFloat(key)}; NEW: {val}; ({key})"); RAGE.Elements.Player.LocalPlayer.Vehicle.SetHandling(key, val); } If someone maked it work i will be appriciate for answer. Thanks
  5. Nothing happens, the value changes but does not apply. When you exit and then enter the stream of the vehicle, the handling value that I set before is reset to default. public void SetVehicleHandling(object[] args) { string key = args[0].ToString(); float val = Convert.ToSingle(args[1]); Chat.Output($"OLD: {RAGE.Elements.Player.LocalPlayer.Vehicle.GetHandlingFloat(key)}; NEW: {val}; ({key})"); RAGE.Elements.Player.LocalPlayer.Vehicle.SetHandling(key, val); } If someone maked it work i will be appriciate for answer. Thanks
  6. Good day. I recently decided to migrate my server to a newer version of RageMP (up to 1.1) and ran into the problem of missing some methods (methods related to ColShape, TextLabel and Blip's). I know for sure that version 1.1 is installed on the RageMP client and server: the client logs into the server without any problems and the server supports NetCore 3.1. When starting a server with a connected resource, this error occurs: Code: At the same time, the server works without problems and you can go to it - the function for creating Blip simply does not work. The
  7. AttachEntityToEntity - GTA Network Wiki NAPI.Entity.AttachEntityToEntity(...) Method doesn't exist in v1.1, How can I attach entities at v1.1?
  8. Hi everyone, I try to find anything about how to set up client-side using C# (I've already searched youtube, wiki, and this forum) but all tutorials say about `cs_packages` and Do we have the ability to set up client-side as an additional project in server solution and use React for UI as CEF? I use RageMP version 1.1 and Rider as an IDE. Thank you in advance!
  9. adri1

    SAMP Dialogs

    Version 1.0.0

    502 downloads

    SA-MP Dialogs for RAGE MP (C# clientside). This is my first resource so may contains bugs... You must enable C# clientside! Usage is simple: examples in Test.cs Dialog(string dialog_name, string dialog_caption, string dialog_info, string[] dialog_buttons, string[] dialog_list_items = null, string dialog_input = null, string dialog_password_input = null)
  10. Everytime game crashes if client-side C# code includes `Task` with `async`, `await` operators. How can I wait a long processing task or how to wait X miliseconds in a thread? --- For example: public class InputTest : Events.Script { public InputTest() { Input.Bind(RAGE.Ui.VirtualKeys.F2, true, HandleF2Button); } private void HandleF2Button() { Chat.Output("F2 pressed. See you in 5 seconds"); Task.Factory.StartNew(async () => { await Task.Delay
  11. Hey all, I need some help to find out how to workaround or fix my code, since there are compilation errors ("Missing assembly x"). - The error output is down below. Here is my code: public static void AddClothsToMenu(UIMenu menu, JArray array, int componentID, JArray ownedClothes) { foreach (JObject element in array) { int drawable = int.Parse(element["drawable"].ToString()); int texture = int.Parse(element["texture"].ToString()); int price = int.Parse(element["price"].ToString());
  12. Hello. I've been meddling around with the RageMP API and I've learned most of it myself with the help of the discord members. Shoutout to Xabi, Sake and everyone else for helping me out with this language. Anywho I've come to realise that when I had started out there was nothing that would guide me through the process of making a server or creating the script for that matter. So here I bring you a YouTube playlist of the RageMP C# language tutorial. It is still under progress but I keep uploading new tutorials daily. And I mostly describe most of the elements so the videos mig
  13. Version 1.0.0

    215 downloads

    This is a C# port of the Player List script by rootcause. -small.gif All credits go to root for the actual resource and the description, which i just yoinked and slightly altered. Source code will be available on github oneday...
  14. Hey everyone, I encountered a problem which I was not able to find a solution to solve my issue. I want to use a JObject parsed from a .json file. I used FileStreams and StreamReaders for that and got the error "C# filestreams could not be used" on login on the client side. My code is: public static JObject GetClothData(Sex sex) { string plainText = string.Empty; using (FileStream fs = File.OpenRead($"Clothes{(sex == Sex.Male ? "M" : "F")}.json")) { using (StreamReader sw = new StreamReader(fs)) { plainText = sw.ReadToEnd(); sw.Close(); }
  15. Version 1.0.1

    281 downloads

    RAGEMP-DiscordIntegration This wrapper allows you easily create an instance of a discord bot within your RAGE:MP server. Features: 1. Send messages to discord from your RAGE:MP Server. 2. Send messages to your RAGE:MP Server from your Discord server. 3. Register specific channel for the bot to listen. (Can be changed during runtime). 3. Remove specific channel for the bot to STOP listening. (Can be changed during runtime). 4. Update bot status on setup and/or during runtime How to use the wrapper 1. Add the RAGEMP-DiscordIntegration.dll as a reference to your
  16. Hello everyone, After I updated my server to 1.1.0-DP1-2 and converted my C# Code to that version, I got an error in console telling me: -> Starting RageZ resource.. RageZ: loading scripts.. found 6 script(s) RageZ: reading referenced assemblies.. found 7 reference(s) RageZ: compiling scripts.. /scripts/World.cs(24,28): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' -> /scripts/World.cs:23 Value cannot be null. (Parameter 'source') -&g
  17. Is there any way to disable "safe threading aka NAPI.Task.Run" and use REAL Tasks/Threads? Or i need to get any locker from NAPI.Task.Run so i can check is it executed (blocking tasks) is there any way including RAGEMP recompiling using something like dnSpy/DotPeek?
  18. Version 1.2

    180 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) {
  19. Version 1.0.0

    550 downloads

    This function helps you to add keys binding if you use C # client side ... Example of use : Tick Event KeyManager.KeyBind(0xA2, () => { Chat.Output("Key Bind Work"); }); KeyManager.KeyBind(KeyManager.KeyMouse, () => { Cursor.Visible = !Cursor.Visible; });
  20. Hello! I've been playing Rage-MP for the last month and now I've decided to try and make my own server but unfortunately I've run into many problems and confusions so I'm writing here in hopes of solving them. I'm currently hosting on ZAP-Hosting, and fortunately for me I can change between Windows and Linux, 0.3.7 and 1.1 versions of RageMP. Now, my first confusion is, all resources and Wiki pages about starting a RageMP server is based on 1.1 version, for which I don't see a reason for now since if you want your server on masterlist it has to be 0.3.7 version. Seco
  21. Hey there. I've one small question regarding instance-variables, when an event get triggered. I've got this little file called XMarker.cs using GTANetworkAPI; public delegate void MyFoo(); public class XMarker : Script { public Marker jobStartMarker { get; set; } public ColShape jobStartCol { get; set; } public MyFoo foo; public XMarker() { } public XMarker(MyFoo callback) { this.jobStartMarker = NAPI.Marker.CreateMarker(0, new Vector3(-420.21115, 1133.7943, 325.90845), new Vector3(), new Vector3(), 1f, new Color(2
  22. plz puch it in german scripting base i can not start a topic on the channel Ich habe ein server genau nach der anleitung von Flashrex aufgesetzt und eingestellt weil ich scripten lernen wollte. Aber wenn ich alles genau wie im video mache was ein wenig dürftig erklärt und in meinen augen einfach nur durch gerusht ist um ja die 15mins einzuhalten fehlen einfach die infos wenn fehler auf treten wie mann sie fixt oder wie mann an den error rann kommt weil eine console die nur System.InvalidOperationException: There is an error in XML document (8, 2). ---> System.Xml
  23. Ich habe gesehen, dass es bisher nur wenige deutsche Tutorials zu RageMP und vor allem zur Beta gibt und dachte ich mach mal eine Reihe für die Community. In der Reihe werden wir C# Serverseitig und Js Clientseitig verwenden. Die Reihe richtet sich an Leute die bereits programmieren können und zumindest die Grundlagen einer objektorientierten Sprache kennen. Ich hoffe ich kann mit den Videos einigen helfen. Fragen, Wünsche für zukünftige Videos & Kritik ist natürlich gerne gesehen. Geplant ist bisher: (nicht unbedingt in der Reihenfolge) -
  24. Hello. I'm stupid new in c# and rage mp. I have an problem. How can I import my class from another cs file on client-side? clientside_cs.txt logs speak that it can't find my type or namespace. Sorry for my English.
×
×
  • Create New...