Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/14/20 in all areas

  1. Version 1.2

    4749 downloads

    UPDATE I highly recommending using my more updated resource "MySQL Accounts" instead as it fixes known issues and runs better: This resource will stay up, however I will not be giving any help for this resource as I don't believe it should be used for serious projects. ---- Basic MySQL Gamemode Github Link: https://github.com/MrPancakers/ragemp-mysql Resource Thread: Discord: MrPancakers#9283 This is a template of a very basic login/registration system you can implement into your game mode to get started. This template only stores usernames, passwords(encrypted with BCrypt), position and money so anything extra will need to be implemented yourself. This is intended for beginners so the code is pretty basic and nothing fancy has been done so it is easily readable. If you find any issues, leave a comment on my thread or leave a comment on this resource. Installation You'll need to have a MySQL server setup, either using WAMP/XAMPP/or from a server. To keep this short I will not go through setting these up, simply Google 'How to set up WAMP' for example to get it set up. Unzip the source and place it inside of your server files folder. Open your command prompt and change your directory to your server folder. Then do 'npm install' to install the required node_modules. Create a new database and call it whatever you want (Inside the script it is called 'ragemp-mysql'). Once created, import the ragemp-mysql.sql into your newly created database. Go to packages/mysql/mysql.js and open it. At the top is the connection info, change this to whatever your IP and MySQL username/password is. If you're hosting this locally and you haven't made/changed the MySQL info, the default should be fine. You're all set to go.
    1 point
  2. Grundsätzlich ist so ein Verkaufsthread ohne Informationen relativ Sinnlos. Denke nicht das du so etwas verkaufen kannst. Aber viel Glück
    1 point
  3. change ssl mode to ;SSL Mode=none on connection string on main.cs
    1 point
  4. Ich verstehe nicht wo das Problem liegt?! RageMP ist kein Server sondern eine Modifikation um auf Server spielen zu können die zu RageMP gehören.
    1 point
  5. Hello everyone! This will be a short guide on how to use colors when using custom chat, not the default one. I know I am not the only one frustrated about this so that's why I want to share this to everyone. Important credits: - Carlos (ex RageMP member) Helped me the most, basically solving everything and giving me a big smile. I still owe you a beer - @Chainksain This dude actually has the same way of doing things as me so big shoutout to him for examples Let's start! Requirements: - Visual Studio 17 or better - Net Core 2.2 - RageMP C# 0.3.7 1. First, create a class that will be used for your chat colorization stuff. Everything will be commented using System; namespace CustomChatColorsTutorial { public static class ChatColorization { // Few general colors public const string ColorRed = "#A80707"; public const string ColorDodgerBlue = "#1E90FF"; /// <summary> /// HEX colorization /// </summary> /// <param name="text">The text you want to colorize</param> /// <param name="color">Use colors from ChatColorization class</param> /// <returns></returns> public static string ColorizeText(string text, string color) { return "<strong style='color:" + color + "'>" + text + "</strong>"; } } } 2. To use colors, do something like this: using System; using GTANetworkAPI; using GTANetworkMethods; namespace CustomChatColorsTutorial { public static class Chat { public void SendExampleMessage(Client player) { NAPI.Chat.SendChatMessageToPlayer(player, ChatColorization.ColorizeText("This is an example", ChatColorization.ColorDodgerBlue)); } } } This will output: This is an example 3. This was simple so far, I agree. But what about mixing few colors in one sentence? Let's say we want to send an error message but nice and clean. This is how we do it: using System; namespace CustomChatColorsTutorial { public static class ChatColorization { // Few general colors public const string ColorRed = "#A80707"; public const string ColorDodgerBlue = "#1E90FF"; // Remember: If you don't explicitly colorize text, it will use your custom chat's default color (white) // In this case, brackets will be white public static string ErrorMessage(string message) { return "(" + ColorizeText("Error", ColorRed) + ") - " + message; } /// <summary> /// HEX colorization /// </summary> /// <param name="text">The text you want to colorize</param> /// <param name="color">Use colors from ChatColorization class</param> /// <returns></returns> public static string ColorizeText(string text, string color) { return "<strong style='color:" + color + "'>" + text + "</strong>"; } } } And then we use that in our Chat class using System; using GTANetworkAPI; using GTANetworkMethods; namespace CustomChatColorsTutorial { public static class Chat { public void SendExampleMessage(Client player) { NAPI.Chat.SendChatMessageToPlayer(player, ChatColorization.ErrorMessage("Something bad happened, please contact the adminstrator!")); } } } This will output: (Error) - Something bad happened, please contact the adminstrator! That's it! You can now use custom colors in your custom chat. If you need assistance, just ask. If something is wrong, please tell me to correct it. Leave feedback. Thank you for reading! xForcer Changelog: Cleaner formatting of ErrorMessage. Removed substring constants
    1 point
  6. Configuring the server If you have fresh installed RAGE Multiplayer and you're aiming to create a new server, you'll need to know how to configure it. There are multiple parameters you can define on the conf.json file, located under server-files folder in path where you installed this mod. This will allow you to change some default values like used ports, refresh rates and more things explained below. Parameter list When openning the file for first time, you will find something like this on it: { { "announce": false, "bind": "127.0.0.1", "gamemode": "freeroam", "name": "RAGE:MP Unofficial server", "maxplayers": 100, "port": 22005, "streamdistance": 500.0 } } Those are some of the parameters we can configure and it will be as easy as adding a new line to that list with the desired key values from the list below: announce -> This parameter takes a boolean value (true/false) and it's used to announce (true) or not (false) the server on the master list, default value is false bind -> Defines the public IP address from the server you are hosting, default value is 127.0.0.1 gamemode -> The name of your gamemode, which will be displayed on the server list, default value is freeroam encryption -> Whether the connection to the server will be encrypted or not (true/false values), default value is false maxplayers -> The maximum ammount of concurrent players that can be online in the server, default value is 100 name -> Your server's unique name, this will help people to find and filter your server in that big server list, default value is RAGE:MP Unofficial server stream-distance -> The maximum distance at which player will be streamed, default value is 500.0 port -> The UDP port that the server will be listening to, remember that the TCP/IP will be the next number to this one, default value is 22005 disallow-multiple-connections-per-ip -> Allows (false) or disallows (true) multiple players to connect from the same IP address, default value is false limit-time-of-connections-per-ip -> Maximum time a player can try to reconnect before getting timeout, default value is 0 url -> The URL of your website, where you give more information about the server language -> The language used in your server, it takes two characters, default value is en sync-rate -> This number indicates how many times per second the server has to synchronize its entities, default value is 40 resource-scan-thread-limit -> Indicates the maximum number of threads used for resource scanning max-ping -> Maximum ping a player can have to be able to play in the server min-fps -> Minimum frames per second a player needs to be able to play in the server max-packet-loss -> Maximum packet loss a player can have to be able to play in the server min-game-version -> Minimum game version required to be able to connect to the server allow-cef-debugging -> Whether the client can (true) or not (false) debug the server's CEF pages csharp -> If your server will be using the C# bridge plugin set it to true, else don't add this line enable-http-security -> When set to true, enables an extra security layer to avoid the server being flooded by fake HTTP requests Note: Numbers and boolean values don't need quotation marks, you should only use them on text parameters. Link to the original Wiki article: Server settings
    1 point
×
×
  • Create New...