Add File-Overview comments, move out of place comments
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
<!DOCTYPE html>
|
<!--
|
||||||
|
* @overview Life of German Reallife - Login Login login.html
|
||||||
|
* @author Orangebox, VegaZ
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*-->
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
$('#loginBtn').click(() => {
|
/**
|
||||||
|
* @overview Life of German Reallife - Login Login login.js
|
||||||
|
* @author VegaZ
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
|
||||||
|
$('#loginBtn').click(() => {
|
||||||
$('.alert').remove(); //Remove any alerts when we attempt to login/register
|
$('.alert').remove(); //Remove any alerts when we attempt to login/register
|
||||||
mp.trigger('loginInformationToServer', $('#usernameInputLogin').val(), $('#passwordInputLogin').val());
|
mp.trigger('loginInformationToServer', $('#usernameInputLogin').val(), $('#passwordInputLogin').val());
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
var loginBrowser = mp.browsers.new('package://Login/login.html');
|
/**
|
||||||
|
* @overview Life of German Reallife - Login Main main.js
|
||||||
|
* @author VegaZ
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
var loginBrowser = mp.browsers.new('package://Login/login.html');
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
|
|
||||||
mp.events.add('loginInformationToServer', (username, password) => {
|
mp.events.add('loginInformationToServer', (username, password) => {
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
.login-page {
|
/**
|
||||||
|
* @overview Life of German Reallife - Login CSS style.css
|
||||||
|
* @author Orangebox
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
|
||||||
|
.login-page {
|
||||||
width: 360px;
|
width: 360px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* @overview Life of German Reallife - Login index.js
|
||||||
|
* @author VegaZ
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
|
||||||
require('./Login/main.js');
|
require('./Login/main.js');
|
||||||
10
Main.cs
10
Main.cs
@@ -1,16 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
|
|
||||||
namespace reallife_gamemode
|
|
||||||
{
|
|
||||||
public class Main : Script
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @overview Life of German Reallife - Main Class (Main.cs)
|
* @overview Life of German Reallife - Main Class (Main.cs)
|
||||||
* @author VegaZ, hydrant
|
* @author VegaZ, hydrant
|
||||||
* @copyright (c) 2008 - 2018 Life of German
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace reallife_gamemode
|
||||||
|
{
|
||||||
|
public class Main : Script
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
[ServerEvent(Event.ResourceStart)]
|
[ServerEvent(Event.ResourceStart)]
|
||||||
public void OnResourceStart()
|
public void OnResourceStart()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
/**
|
using System;
|
||||||
* @overview Life of German Reallife - DatabaseContext.cs
|
|
||||||
* @author VegaZ
|
|
||||||
* @copyright (c) 2008 - 2018 Life of German
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @overview Life of German Reallife - DatabaseContext.cs
|
||||||
|
* @author VegaZ
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
|
||||||
namespace reallife_gamemode.Model
|
namespace reallife_gamemode.Model
|
||||||
{
|
{
|
||||||
public partial class DatabaseContext : DbContext
|
public partial class DatabaseContext : DbContext
|
||||||
@@ -35,6 +35,5 @@ namespace reallife_gamemode.Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DbSet<Server.Entities.User> Users { get; set; }
|
public DbSet<Server.Entities.User> Users { get; set; }
|
||||||
public DbSet<Server.Entities.Character> Characters { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ using reallife_gamemode.Server.Extensions;
|
|||||||
using reallife_gamemode.Server.Services;
|
using reallife_gamemode.Server.Services;
|
||||||
using reallife_gamemode.Server.Util;
|
using reallife_gamemode.Server.Util;
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Commands
|
|
||||||
{
|
|
||||||
public class Admin : Script
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @overview Life of German Reallife - Admin Commands (Admin.cs)
|
* @overview Life of German Reallife - Admin Commands (Admin.cs)
|
||||||
* @author VegaZ, hydrant
|
* @author VegaZ, hydrant
|
||||||
* @copyright (c) 2008 - 2018 Life of German
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace reallife_gamemode.Server.Commands
|
||||||
|
{
|
||||||
|
public class Admin : Script
|
||||||
|
{
|
||||||
[Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)]
|
[Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)]
|
||||||
public void CmdAdminO(Client player, string message)
|
public void CmdAdminO(Client player, string message)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Entities
|
|
||||||
{
|
|
||||||
public class Character
|
|
||||||
{
|
|
||||||
[Key]
|
|
||||||
public int Id { get; set; }
|
|
||||||
public int UserId { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public byte Gender { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,6 +5,12 @@ using System.ComponentModel.DataAnnotations;
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @overview Life of German Reallife - Entities User (User.cs)
|
||||||
|
* @author VegaZ, hydrant
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Entities
|
namespace reallife_gamemode.Server.Entities
|
||||||
{
|
{
|
||||||
public class User
|
public class User
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using reallife_gamemode.Model;
|
using reallife_gamemode.Model;
|
||||||
using reallife_gamemode.Server.Entities;
|
using reallife_gamemode.Server.Entities;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @overview Life of German Reallife - Event Login (Login.cs)
|
||||||
|
* @author VegaZ
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Events
|
namespace reallife_gamemode.Server.Events
|
||||||
{
|
{
|
||||||
class Connect : Script
|
class Connect : Script
|
||||||
|
|||||||
@@ -3,6 +3,12 @@ using System.Collections.Generic;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @overview Life of German Reallife - Event Login (Login.cs)
|
||||||
|
* @author VegaZ
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Events
|
namespace reallife_gamemode.Server.Events
|
||||||
{
|
{
|
||||||
public class Login : Script
|
public class Login : Script
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ using GTANetworkAPI;
|
|||||||
using GTANetworkMethods;
|
using GTANetworkMethods;
|
||||||
using reallife_gamemode.Model;
|
using reallife_gamemode.Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @overview Life of German Reallife - Event Spawn (Spawn.cs)
|
||||||
|
* @author VegaZ
|
||||||
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
|
*/
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Event
|
namespace reallife_gamemode.Server.Event
|
||||||
{
|
{
|
||||||
public class Spawn : Script
|
public class Spawn : Script
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Extensions
|
|
||||||
{
|
|
||||||
public static class ClientExtension
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @overview Life of German Reallife - Client Extension (ClientExtension.cs)
|
* @overview Life of German Reallife - Client Extension (ClientExtension.cs)
|
||||||
* @author VegaZ, hydrant
|
* @author VegaZ, hydrant
|
||||||
* @copyright (c) 2008 - 2018 Life of German
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace reallife_gamemode.Server.Extensions
|
||||||
|
{
|
||||||
|
public static class ClientExtension
|
||||||
|
{
|
||||||
public static User GetUser(this Client client)
|
public static User GetUser(this Client client)
|
||||||
{
|
{
|
||||||
using(DatabaseContext dbContext = new DatabaseContext())
|
using(DatabaseContext dbContext = new DatabaseContext())
|
||||||
|
|||||||
@@ -3,16 +3,16 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Services
|
|
||||||
{
|
|
||||||
class ChatService
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @overview Life of German Reallife - Chat Service (ChatService.cs)
|
* @overview Life of German Reallife - Chat Service (ChatService.cs)
|
||||||
* @author hydrant
|
* @author hydrant
|
||||||
* @copyright (c) 2008 - 2018 Life of German
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace reallife_gamemode.Server.Services
|
||||||
|
{
|
||||||
|
class ChatService
|
||||||
|
{
|
||||||
public static void NotAuthorized(Client player)
|
public static void NotAuthorized(Client player)
|
||||||
{
|
{
|
||||||
player.SendChatMessage("~r~[FEHLER]~s~ Du kannst diesen Befehl nicht ausführen.");
|
player.SendChatMessage("~r~[FEHLER]~s~ Du kannst diesen Befehl nicht ausführen.");
|
||||||
|
|||||||
@@ -3,16 +3,16 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Services
|
|
||||||
{
|
|
||||||
class ClientService
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @overview Life of German Reallife - Client Service (ClientService.cs)
|
* @overview Life of German Reallife - Client Service (ClientService.cs)
|
||||||
* @author hydrant
|
* @author hydrant
|
||||||
* @copyright (c) 2008 - 2018 Life of German
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace reallife_gamemode.Server.Services
|
||||||
|
{
|
||||||
|
class ClientService
|
||||||
|
{
|
||||||
public static Client GetClientByName(string name)
|
public static Client GetClientByName(string name)
|
||||||
{
|
{
|
||||||
/* Funktionsaufbau: Prüft erst, ob ein Spieler mit exakt diesem Namen online ist
|
/* Funktionsaufbau: Prüft erst, ob ein Spieler mit exakt diesem Namen online ist
|
||||||
|
|||||||
@@ -2,16 +2,18 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace reallife_gamemode.Server.Util
|
|
||||||
{
|
|
||||||
public enum AdminLevel : int
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @overview Life of German Reallife - Admin Levels (AdminLevel.cs)
|
* @overview Life of German Reallife - Admin Levels (AdminLevel.cs)
|
||||||
* @author VegaZ, hydrant
|
* @author VegaZ, hydrant
|
||||||
* @copyright (c) 2008 - 2018 Life of German
|
* @copyright (c) 2008 - 2018 Life of German
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace reallife_gamemode.Server.Util
|
||||||
|
{
|
||||||
|
public enum AdminLevel : int
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
PLAYER,
|
PLAYER,
|
||||||
SUPPORTER,
|
SUPPORTER,
|
||||||
ADMIN
|
ADMIN
|
||||||
|
|||||||
Reference in New Issue
Block a user