Search the Community

Showing results for tags 'CSharp'.



More search options

  • 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

Found 52 results

  1. Hi guys! Please tell me how to know. Can I start server-side development in C#? And in parallel to develop the client-side in JavaScript language? I want to use 2 languages simultaneously for development. Each side has its own. How can I implement this?
  2. Всем привет! Пожалуйста, подскажите кто знает. Могу ли я начать разработку на стороне сервера на языке C#? И параллельно разрабатывать клиент на языке JavaScript? Я хочу использовать одновременно 2 языка для разработки. На каждой стороне свой. Как я могу это реализовать?
  3. Hello. Does anyone know why my client scripts will not be executed? I created the "enable-clientside-cs.txt" in the RAGEMP root folder. My Script in "client_packages/cs_packages/Main/Main.cs": using RAGE; namespace UFFRClientScripts { public class Main : Events.Script { public Main() { Chat.Output ("Loaded Client Scripts!"); } } }
  4. I want to do a job with the Trashmaster and i need the rear position of the car. There should be a marker and u have to throw trash in the vehicle there. I cant find a function that i could use for that. I thought about getting the vehicle rotation and then calculate the position (where the trash should be thrown in). Maybe you guys could help me here with the calculation for that or smth like that. Thank you.
  5. I'm thinking which language should I use to make a server. Which is more supported for RageMP? Which would u recommend to start and why? I have learned both so the knowledge wouldn't be a problem.
  6. Hi guys! Can I use Graphics.DrawSprite() method and how? The wiki has a JS language description only. I want to make a C# program, and I need this function.
  7. Hey, just started with RageMP scripting and wonder if its possible to let the Game load the compiled Assemblys instead of the raw .cs files for C# client-side scripts. If its not possible, are there any plans to support this in future releases? Thanks in advance and thanks for RageMP - comparing to some other MP mods the development feels way more "natural"!
  8. Hello Someone asks me, how to create a car at right side next to player. So i just wrote this little tutorial about. I hope you enjoy this little thing, which was did in two hours, and explained with a horrible english ;D Spend time: 2 hours testing the spawn of vehicles and coding + doc 3 hours making this tutorial with translation 0.5 hours thinking about, why i am doing this ... (i didn't found an answer -.-) First we have to know some things: How is the World working How is the Position working How is the Rotation working How can i spawn a car (Code snippet) How is the World working? => It is a north axis oriented map. If you open the full map ingame, top is north, bottom is south. It is every time a constant and will not change How is the Position working? => It is a Vector based information. It has three types. X => left - | + right Y => top - | + bottom Z => down - | + up The "+" and "-" are the operators here in our coordination system, which we have to use later. How is the Rotation working? => It is a Vector based information. Same here we have three types, but the number is always positive. So we can just use the Z variable. X => back | front (Not tested) Y => left | right (Not tested) Z => ground Then we will get four options: N => 0° E => 270° S => 180° W => 90° We have to use the radius to know how the player is rotated away from north. Just think about your shool days. back then you had geometry and raius was a topic of it. Ok, we got our information. Let us code that stuff Small version Doc version
  9. Hey, ich bin ziemlich neu im C# Programmieren, belege derzeitig noch einen Video Kurs auf udemy.com und programmiere nebenbei kleinweise eine RP Resource. Ich stehe nun kurz davor das ganze mit einer Datenbank zu verbinden. Nun wollte ich fragen, ob es egal ist das ganze einfach nur via Mysql mit der Datenbank zu verbinden oder gibt es noch bessere Wege. Nebenbei wollte ich fragen, ob eine Verbindung mit der Datenbank alleine via C# möglich wäre und ob's empfehlenswert ist. Liebe Grüße, Jeff
  10. Guten tag I was going to build a server but soon learned it was not going to be quick. Kind of gone off the idea now, but I have still been enjoying messing around. I've made a repo in the case I do go completely go off the idea which should help the next person with a bit more to look at. Read the inital readme to update the submodules before building. If you want built resources I can provide. https://github.com/horseyhorsey/RageMpResources Credit to anyone that helped in discord, xabi (atms) (project to look through), Guad, george, extra thank to rootcause because providing great snippets & data and Sake4Mod
  11. Version 1.0.0

    415 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; });
  12. Hi guys! It's me again. We have our server setup on Ubuntu 16.04 64bit. Actually almost everything works perfect. Except "NAPI.Vehicle.CreateVehicle()". After using this line our server crashes just with info: Aborted (core dumped). Do you have any ideas why? What could we do? Thanks for your help
  13. Hi guys, after some hours of programming, I've got an error. This is my exception-log: ==================[28.12.2018 04:10:52]================== System.NullReferenceException: Object reference not set to an instance of an object. at void GTV.Systems.Cargo.Core.AttachCargosToLoadings() in C:\Users\Kacper\Documents\GT-V\GTV\GTV\Systems\Cargo\core.cs:line 118 ========================================================= ==================[28.12.2018 04:10:52]================== System.Reflection.TargetParameterCountException: Parameter count mismatch. at object[] System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) ========================================================= Here's my console: Step 1 Step 2 Step 3 Step 4, r: 1, c: 0, llc: 3 Step 5 [Cargo] Cargo destination has been set to 3 Step 6, 0 GTV.Systems.Cargo.Cargo And here are the functions doing this staff: ... public void AttachCargosToLoadings() { try { if (cargos_list.Count <= 0) throw new Exception("Brak towarów"); if (loadings_list.Count <= 1) throw new Exception("Brak załadunków"); int currentLoadingID = 0; NAPI.Util.ConsoleOutput("Step 1"); foreach (Loading load in loadings_list) { NAPI.Util.ConsoleOutput("Step 2"); for (var i=0;i<5;i++) { NAPI.Util.ConsoleOutput("Step 3"); int randomIndex = random.Next(cargos_list.Count - 1); AttachDestinationToCargo(cargos_list[randomIndex],currentLoadingID); NAPI.Util.ConsoleOutput("Step 6, "+randomIndex); NAPI.Util.ConsoleOutput(cargos_list[randomIndex].ToString()); NAPI.Util.ConsoleOutput(cargos_list[randomIndex].GetType().ToString()); load.cargos.Add(cargos_list[randomIndex]); NAPI.Util.ConsoleOutput("Step 7"); NAPI.Util.ConsoleOutput("[Cargo] Inserted Cargo ("+cargos_list[randomIndex].name+") to Loading ("+load.id+")", ConsoleColor.DarkGreen); NAPI.Util.ConsoleOutput("Step 8"); } currentLoadingID++; } } catch (Exception e) { NAPI.Util.ConsoleOutput("[Cargo] " + e.Message + " (Init Attach)", ConsoleColor.Red); } } public void AttachDestinationToCargo(Cargo cargo, int currentLoadingID) { int randomIndex = random.Next(loadings_list.Count - 1); while(randomIndex==currentLoadingID) { randomIndex = random.Next(loadings_list.Count - 1); } NAPI.Util.ConsoleOutput("Step 4, r: "+randomIndex+", c: "+currentLoadingID+", llc: "+loadings_list.Count); cargo.destination = loadings_list[randomIndex]; NAPI.Util.ConsoleOutput("Step 5"); NAPI.Util.ConsoleOutput("[Cargo] Cargo destination has been set to "+loadings_list[randomIndex].id, ConsoleColor.DarkCyan); } ... Cargo class: public int id { get; set; } public string name { get; set; } public bool legal { get; set; } public string color = "#ffffff"; public double money_multipler { get; set; } public double exp_multipler { get; set; } public int event_id = 0; public int courses = 0; public Loading destination { get; set; } Loading class: public int id { get; set; } public Vector3 pos { get; set; } // Init cargos public List<Cargo> cargos { get; set; } //After InGame Create public Marker marker { get; set; } public ColShape colshape { get; set; } public Blip blip { get; set; } public TextLabel text { get; set; } bool error = false; What Am I doing wrong? I really appreciate your help
  14. DjEnzo

    How to use MySQL

    Hi guys! Am about to start programming my new server, but I cannot use MySQL. I started with this tutorial -> https://rage.mp/forums/topic/1807-c-getting-started-debugging/ This is how my code looks like: using System; using System.Data; using GTANetworkAPI; using MySql.Data.MySqlClient; namespace GTV { class MySQL { private string connectionString = "SERVER=localhost;" + "DATABASE=gtv;" + "UID=root;" + "PASSWORD=;" + "SslMode=none"; public bool FirstConnect() { MySqlConnection db = new MySqlConnection(connectionString); db.Open(); string state = db.State.ToString(); NAPI.Util.ConsoleOutput(state); if (db.State == ConnectionState.Open) return true; else return false; } } } And here my pretty long exception: What did I do wrong? Thank you for your help.
  15. Version 1.0.0

    97 downloads

    Send mails from the server simple and easy. Ex: To work, you need to enable IMAP Access *This code was only tested on the GMAIL service
  16. using System; using GTANetworkAPI; namespace roleplay { public class Main : Script { public Main() { } [ServerEvent(Event.PlayerSpawn)] public void OnPlayerConnected(Client player) { NAPI.Util.ConsoleOutput("Roleplay wurde sasd!"); } [ServerEvent(Event.ResourceStart)] public void OnResourceStart() { NAPI.Util.ConsoleOutput("Roleplay wurde gestartet!"); } } } This is my code and the onPlayerConnected Event make nothing. I don't know why. I hope you can help me! Thank you.
  17. Hello, scripters! 😀 I'm new to the RAGE scene and recently started scripting my own gamemode. I'm using WiredPlayers gamemode as an example, but i have some strange issues. So far i succeeded creating VS solution, connecting it with MySQL database and player authentication system. But i have one problem with recreating the lobby system: I can't set the player position when they are logging in, but strangely enough i can change other player-related properties like skin. Here is my code: [ServerEvent(Event.PlayerConnected)] public void OnPlayerConnected(Client player) { NAPI.Player.SetPlayerSkin(player, PedHash.Stripper01SFY); // WORKS PERFECTLY player.Transparency = 255; InitializePlayerData(player); // CALLING THE INITIALIZEPLAYERDATA FUNCTION //Other stuff for logging the user } private void InitializePlayerData(Client player) { player.Position = new Vector3(152.26, -1004.47, -99.00); //DOESN'T TELEPORT THE PLAYER AT THIS POSITION player.Dimension = Convert.ToUInt32(player.Value); player.Health = 100; } But when i finish logging in and i use the command /goto, it teleports me to that destination. [Command("goto", "~y~USAGE: ~w~/goto")] public void CMD_Goto(Client player) { player.Position = new Vector3(152.26, -1004.47, -98.00); } Is there something i'm missing in order for this to work ??
  18. Guten Morgen Community, wir sind gerade an der Konzeption eines Projektes und wegen zur Zeit ab in welcher Sprache wir es entwickeln sollen. C# oder NodeJS? Würde mich über eure Antworten freuen und Gründe warum Ihr die gewählte Sprache nehmen würdet oder warum man sie nehmen sollte. Vielen Dank!
  19. Tach Ladys 😉 Grundidee: Ein Auto auf ein Flatbed kleben und das soll da auch bleiben bis zum Absockeln. Unter NodeJS funktioniert das AttachTo einwandfrei nun möchte ich das auch unter C#. Da die Funktion "not implemented yet" ist versuchte ich Workarounds wie AddRope, Freeze und Timerbased Positioning. Nun hoffe ich das andere Entwickler bessere Ideen haben als meine? 😉 Clientside fällt weg da es nicht gesynct ist... falls man das syncen kann für alle nur raus damit wie^^ Grüße White 😉
  20. Доброго времени суток, подскажите, как изменить стандартный спавн игрока при подключении к серверу и после смерти? На [DisableDefaultOnDeathRespawn] Visual Studio ругается "Не удаётся найти тип или имя пространства имён, GTANetworkAPI подключён.
  21. Hello everyone! I've got some errors with the linux bridge package. Some assemblies are not found by the server (and yes, they're in the runtime directory because they come with the bridge package). -> Starting admin resource.. admin: loading scripts.. found 1 script(s) admin: reading referenced assemblies.. found 1 reference(s) admin: warning, netstandard.dll is not found! admin: compiling scripts.. admin: instantiating Main.AdminScript.. admin: loading server events.. found 2 server event(s) admin: loaded 2 server events(s) admin: loading commands.. found 9 command(s) admin: loaded 9 commands(s) -> Resource admin started! Complete version: In this case, the resource doesn't need methods from the assembly (so, it doesn't really matter...) and it won't prevent the compilation. Steps to reproduce: Prepare a fresh install of linux server (with the bridge!). Go through bridge resources directory and open meta.xml in "admin/" (for example). Paste this new content: <meta> <info name="Administration Utilities" author="Guadmaz" type="script" /> <assembly ref="netstandard.dll"/> <script src="admin.cs"/> </meta> Start the server. This will not work with all of the assemblies. For example, System.Linq.dll will be detected and System.Linq.Queryable.dll will not. All of my tests have been done on Debian 9 and Ubuntu 16.04 (with all required deps). I don't know what to do to solve the problem... maybe an assembly version problem? Thanks!
  22. Здравствуйте, только сегодня узнал о данном мультиплеере. Начал разработку сервера, но так как я C# знаю на довольно высоком уровне, естественно мне захотелось писать на нём. С запуском скриптов на JS всё хорошо, а вот с шарпом проблемы. Может кто знает как решить проблему на скрине и где взять файл coreclr.dll? Делал всё по данному уроку: https://github.com/SkyLaGer/RageMP-CSharp-Wiki/wiki/Новый-проект-в-Visual-Studio-2017
  23. Shourya90

    help please

    https://pastebin.com/aMH8pi3U
  24. Hello, I have one suggestion for team RageMP, please create extension for Microsoft Visual Studio Code. When I write scripts, I have to look at api constantly. Please, consider my suggestion
  25. Hello, i have a ask for about scripting, which language is better Nodejs or CSharp for perormence (Server site)