Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/01/18 in all areas

  1. Version 1.0.2

    4160 downloads

    Features overview Account system with timed bans A simple admin system Spawn protection (optional) Weapon shops and garages Crouching Killstreaks Different firing modes (single, burst, auto, safe mode) Turf capturing Getting started Put the files in their respective places Go to packages/thewire/config.json and write your database information Import the database.sql file using phpMyAdmin and such Start your server, should be done Making yourself admin Make an account Go to accounts table and set Admin field's value to 1 OR run a query to do it: UPDATE accounts SET Admin=1 WHERE Username='YourAccountName' Save and login ingame Team management Go to packages/thewire/data/teamData.json, teams are stored in this file as key:value For ColorName and ColorHex, check WIKI: Fonts and Colors For VehicleColor, check WIKI: Vehicle Colors For BlipColor, check WIKI: Blips If you remove a key:value pair, you'll remove that team Save file & restart the server Adding/removing vehicles Go to packages/thewire/data/teamData.json, vehicles are connected to teams Add your vehicle model name (e.g zentorno) to the Vehicles array of the team(s) you want Go to packages/thewire/data/vehiclePrices.json Add your vehicle model name and price. (e.g "zentorno": 10000) Save files & restart the server Adding/removing weapons Go to packages/thewire/data/weaponPrices.json Make sure the weapon you want to add is valid! See WIKI: Weapons Add your weapon name and price. (e.g "WEAPON_PISTOL50": 900) Save file Go to client_packages/cef/weaponIcons Add your weapon icon with the file name being your weapon hash (not the name!) Restart the server Config.json This file is located in packages/thewire/ and lets you control a lot of things. database: Write your database information here. dbLogging: Lets you control which parts of logging is enabled. A lot of stuff are being logged by default. loginDimension: The dimension joined players get sent to. (Default: -1) startingMoney: The amount of money registered players get. (Default: 1500) spawnProtectionSeconds: Duration of the spawn protection, in seconds. (Default: 5) accountSaveInterval: Interval of the auto save to prevent stat loss, in minutes. (Default: 10) killRewardMin and killRewardMax: The amount of money players get for killing an enemy. (Default: 100 and 200) teamKillPenalty: The amount of money loss players get for team killing. (Default: 1000) killstreakReward: The base amount of money a player gets for a 5+ killstreak. Killstreak reward is calculated as: killstreakCount * reward on every factor of 5. (Default: 100) weaponShopMagCount: How many magazines a player gets when they buy a weapon. (Default: 6) playerVehicleSpawnLimit: How many vehicles a player can have spawned at once. (Default: 5) turfCaptureMaxProgressIncrease: Turf attack progress cap. People more than this amount isn't required in the checkpoint. (Default: 5) turfCaptureRequiredProgress: Required progress to capture a turf. (Default: 50) turfIncomeInterval: Interval of the turf income sharing between team members, in minutes. (Default: 15) bcryptCost: Read this (Default: 10) spawnWeapons: Weapons and ammo the players get when they spawn. This applies to all teams. (Default: Bat and Pistol with 240 ammo) world: World settings, there is actually a time system but it doesn't show itself until a few hours pass. (Default: CLEAR weather and 10:00:00) log4js: Logger settings, you don't really need to touch this. Turfs Teams can capture turfs in this gamemode and make money. All you need to do is stand in a turf checkpoint, wait until the progress reaches 100% (it will be captured faster if there are teammates with you, up to 5 players) Though doing that will alert the turf's current owners. If the owners manage to clear the turf before it is captured, they'll keep it. Turf income happens every 15 minutes which just sums all of your team's turf income and shares it between team members. Admin Commands /tp [x] [y] [z] - Lets you teleport to a position. /agivemoney [player ID] [amount] - Gives money to a player. /agiveweapon [player ID] [weapon name] [ammo] - Gives weapons to a player. /kick [player ID] [reason] - Kicks a player. /banplayer [player ID] [days] [reason] - Bans a player. /banaccount [account ID] [days] [reason] - Bans an account, best used for banning players that are offline. /baninfo [ban ID] - Returns information about a ban. /removeban [ban ID] - Removes a ban. /createweaponshop - Creates a weapon shop on your position. /removeweaponshop [ID] - Removes a weapon shop. /creategarage - Creates a garage on your position. /removegarage [ID] - Removes a garage. /createturf [income] [radius] [name] - Creates a turf on your position. Radius isn't used right now but it will be in 0.4. /removeturf [ID] - Removes a turf. Player Commands /pm [player ID] [message] - Sends a private message to a player. /stats [player ID] - Shows the stats of a player. (Kills, deaths, K/D ratio, money, register date) /givemoney [player ID] [amount] - Sends money from your account to another player's account. /top5 [ranking] - Shows the top 5 online players of a ranking. (Available rankings: kills, money) If you encounter a bug, feel free to leave it as a comment. Hopefully all this text is enough, have fun and see you on the battlefield!
    1 point
  2. I wanted to make a tutorial that is a little different from what is currently offered on the wiki (https://wiki.gtanet.work/index.php?title=Setting_Up_a_Development_Environment_using_Visual_Studio) This tutorial gets you through setting up a project outside the RAGE MP folder, that automatically builds into a resource folder, and allows debugging by simply pressing "Run" or F5 in Visual Studio 2017 There's a download of a project set up this way in the bottom of the post, if you just want to get started as fast as possible. You'll need to change all the paths in the configured project obviously, but there you go. Prerequisites Visual Studio 2017 (At the time of writing, using version 15.7.1) RAGE MP installed and server set up. Common sense Setup Ensure the .NET Core cross-platform development package/product is installed. Open Visual Studio Installer from the start menu Click on modify under Visual Studio {Version} 2017 Find .NET Core cross-platform development and make sure it's checked If it wasn't installed previously, after checking the box on this item, click modify in the bottom right, and install the package. Creating the project Open Visual Studio, and click File -> New -> Project. In the tree on the left, go to Installed -> Visual C# -> .NET Core. Then select Class Library (.NET Core) in the list on the right. Give your project a name in the bottom, choose a location to store it (can be anywhere on your PC), and hit OK This should create a project that compiles as .NET Core 2.0, which is the version used for resources at the time of writing. It may change to 2.1 in version 0.4 of RAGE MP. To ensure the project compiles to Core 2.0, right click on your new project in the Solution Explorer, and select Properties. Under Target framework, ensure it says .NET Core 2.0 While we're here, we can configure debugging. On the left, select the Debug tab, change the Launch dropdown to Executable. A new item appears: Executable with a Browse... button. Click browse, and select your RAGE MP server.exe The second input below that is for Working directory, set that to the folder that contains server.exe Save this window and close it. Build configuration Now we need to change how the project is built. If you want use external NuGet packages, you'll want Visual Studio to copy their DLLs to the build directory. Right click on your project in the Solution Explorer, and click Edit {project name}.csproj Under <TargetFramework>netcoreapp2.0</TargetFramework> Add the following: <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> Save and close the file. Now we set up the Meta.xml file. Right click on your project, and select Add -> New Item... In the pop-up dialog, click on Installed -> Visual C# Items in the tree on the left, then scroll down and select Xml File in the list on the right, and name it meta.xml Replace the file contents with the following, replacing ExampleResource with the name of your project: <meta> <info name="ExampleResource" type="script" /> <script src="ExampleResource.dll" /> </meta> Save and close the file. Right click on the file in Solution Explorer and click Properties Set Build Action to Content and Copy to Output Directory to Copy always Now let's configure it to copy the built project to the resources directory. Go back to the project properties (Solution Explorer, right click on the project, Properties). Open the Build Events tab, and put the following code in the text box under Post-build event command line: del "D:\Games\RAGEMP\server-files\bridge\resources\ExampleResource\*.*" /Q xcopy "$(OutDir)*" "D:\Games\RAGEMP\server-files\bridge\resources\ExampleResource" /Y Make sure to replace the path to \bridge\resources and ExampleResource with the correct path to the resources, and your project name. Also make sure the folder exists, obviously. Save and close the properties window. Try going to Build -> Rebuild Solution in the top of Visual Studio. This should complete successfully, and several DLLs should now appear in the resource folder in your server installation. Add the resource to the server settings.xml Open the settings.xml file in the RAGE MP server directory under the bridge folder Add the following, replacing ExampleResource with the name of your resource <resource src="ExampleResource" /> Save and close the file. Creating the resource Alright, that should be the basic project and debugging configured. Now let's add the GTA Network package so we can create a resource. In the Solution Explorer, right click on your project and select Manage NuGet packages... Click on Browse in the top left, search for gtanetwork.api, and install the gtanetwork.api package. By default, there should be a Class1.cs with a class in it called Class1. I like to rename this to Main.cs with a class Main, I suggest you do the same as I'll be referring to it in the rest of the tutorial. Replace the content of the file with the following. I will not be explaining basic C#, but it'll demonstrate the project working, and give you an entry point for the code: using System; using GTANetworkAPI; namespace ExampleResource { public class Main : Script { [ServerEvent(Event.ResourceStart)] public void OnResourceStart() { NAPI.Util.ConsoleOutput("Example resource loaded!"); } } } Save the file, and HIT THAT MF DEBUG BUTTON in the top of Visual Studio The server should now start up and show our console output: Breakpoints Breakpoints should also work immediately, try placing one on the console output, and hit debug: If something still doesn't work, you can download an example project here, which was set up using the steps above. Obviously you'll need to change the paths configured in it to match your system, but it may help you debug any issues.
    1 point
  3. Mate, start small, think big; what you have here, it's enought to start a big project.
    1 point
  4. give voice an all language in this platform, and, if spanish have a forum in non-english, why don't italian ? i suppot the motion.
    1 point
  5. Just go to your .nuget folder, go to gtanetwork.api and get it from there, copy the 0.3.6 version to your runtime folder.
    1 point
  6. Version 1.0.0

    202 downloads

    A small (and extremely delayed, it was originally planned for halloween!) C# resource that lets players toggle flaming footprints. This feature was first used in GTA Online's Lost vs Damned adversary mode. Installing & Using Put the files you downloaded in their respective places Use /footprints command in game to toggle the effect
    1 point
  7. Awesome, was waiting for client side C#. Any chance we can get some more info on how to create client side C# resources? Do I need to put .cs files into a folder in RAGEMP\server-files\client_packages\cs_packages\MyPackage? Also settings.xml seems to have disappeared from the bridge folder, where do I specify what resources to load? Edit: Nvm that one, needed to setup the bridge again. And how does it decide what client side C# resources to load? Edit 2: Did some experimenting, so you need to put .cs files into RAGEMP\server-files\client_packages\cs_packages\RageMpCsharpTest All resources in there get automatically loaded.
    1 point
×
×
  • Create New...