(Go: >> BACK << -|- >> HOME <<)

Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Kola50011/EvoMp

Repository files navigation

Evolution Multiplayer Framework

GT-MP fun and easy
A framework for creating sturdy Grand Theft Multiplayer Servers.

CircleCI License: LGPL v3

WebsiteKey FeaturesHow To UseCreditsRelatedLicense

Table of Contents

Key Features

  • Server- & Clientside Modularisation
  • Extensive Web-Framework Support
    • Preact
    • React
    • Vue.js
  • import / export syntax on the client

How to Use (Windows)

1. Prerequisites

In order to use this framework you need to clone and run everything. You'll need Git, Visual Studio 2017, (& Visual Studio Code), Node.js 8.x.x & Yarn

# Clone this repository
$ git clone https://github.com/Kola50011/EvoMp.git

# Go into the repository
$ cd EvoMp

# Install clientside dependencies
$ yarn install

# Compile the Client-Side
$ yarn build

2. Visual Studio Settings

  • Open EvoMp/EvoMp.sln
  • Right click on project EvoMp.Core.StartupProject
  • Choose Set as StartUp Project
  • Right click on project EvoMp.Core.StartupProject
  • Choose Properties
  • Choose Debug on left side
  • As workspace select ....../GTMP_Server/
  • Click Build and Rebuild Solution
  • Finally press Start

3. Optional Visual Studio Settings

  • Tools / Extras -> Options
    • Go to Projects and Solutions
    • Select subitem Build and Run
    • Under On Run, when projects are out of date select Always build
    • Uncheck Only build startup projects and dependencies on Run

Credits

This framework makes use of several open source project. For details see here.

This README.md file is based upon the work of electron-markdownify

Related

License

This framework is licensed under the GNU LGPLv3. See LICENSE for details.

Debugging

Entity Framework Query Debuging

Add the following line in the context constructor to enable the logging:

Database.Log = s => { };

Full Example:

public VehicleContext() : base(Environment.GetEnvironmentVariable("NameOrConnectionString"))
{
    // Database logging
    Database.Log = s => { };
}

Suggested IDE Addons / Plugins

Visual Studio Code

Custom GT-MP type overwrites

  • Any custom type begins with the prefix "Extended"
    • VehicleHandler ~ ExtendedVehicle
    • ...

Developing on Ubuntu

# Run the following commands as a su
$ sudo -s

# Set variables for setup
$ MyGetUserName=USERNAME; # For MyGet access
$ MyGetPassword=PASSWORD; # For MyGet access
$ MyGetApiKey=MYGETAPIKEY; # For MyGet access (Can be generated on the MyGet site)
$ RepositoryRoot='/path/to/EvoMp'; # Your RepositoryRoot path

# Install Mono
$ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
$ echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | tee /etc/apt/sources.list.d/mono-official.list
$ apt-get install mono-devel -y

# Install NuGet
$ apt-get update
$ apt-get install nuget -y

# (OPTIONAL) Set MyGet source as the NuGet source
$ nuget setapikey $MyGetApiKey -source "https://www.myget.org/F/gt5mp/api/v2"
$ nuget sources add -Name "grandtheftmultiplayer.api" -source "https://www.myget.org/F/gt5mp/api/v2" -User $MyGetUserName -pass $MyGetPassword -ConfigFile ~/.config/NuGet/NuGet.Config

# NuGet restore
$ cd $RepositoryRoot/EvoMp
$ nuget restore EvoMp.sln -NoCache -ConfigFile ~/.config/NuGet/NuGet.Config

# Compile the Server-Side
$ msbuild EvoMp.sln /p:TargetFrameworkVersion=v4.6.2 /p:Configuration=Linux EvoMp.sln

# Install NodeJS
$ curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs

# Install Yarn
$ apt-get install apt-transport-https -y
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -""
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
$ apt-get update && apt-get install yarn -y

# Get Clientside Dependencies
$ cd $RepositoryRoot
$ yarn install

# Compile the Client-Side
$ yarn build

# Start the server
$ cd $RepositoryRoot/GTMP_Server
$ mono GrandTheftMultiplayer.Server.exe

// Update: Now it's an active GitHub project, so store it Microsoft for 1k years :3