Continued faction system
This commit is contained in:
41
Server/Commands/Faction.cs
Normal file
41
Server/Commands/Faction.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using GTANetworkAPI;
|
||||
using reallife_gamemode.Server.Entities;
|
||||
using reallife_gamemode.Server.Extensions;
|
||||
using reallife_gamemode.Server.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Faction Commands (Faction.cs)
|
||||
* @author VegaZ, hydrant
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace reallife_gamemode.Server.Commands
|
||||
{
|
||||
class Faction : Script
|
||||
{
|
||||
[Command("f", "~m~Benutzung: ~s~/f [Nachricht]", GreedyArg = true)]
|
||||
public void CmdFactionF(Client player, string message)
|
||||
{
|
||||
User u = player.GetUser();
|
||||
|
||||
if(u == null)
|
||||
{
|
||||
NAPI.Util.ConsoleOutput("u is null");
|
||||
return;
|
||||
}
|
||||
Entities.Faction f = u.Faction;
|
||||
if(f == null)
|
||||
{
|
||||
NAPI.Util.ConsoleOutput("f is null");
|
||||
return;
|
||||
}
|
||||
|
||||
string broadcastMessage = "** " + player.Name + ": " + message + " )) **";
|
||||
|
||||
ChatService.BroadcastFaction(broadcastMessage, player.GetFaction());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user