50 lines
1.6 KiB
C#
50 lines
1.6 KiB
C#
using GTANetworkAPI;
|
|
using ReallifeGamemode.Server.Entities;
|
|
using ReallifeGamemode.Server.Extensions;
|
|
using ReallifeGamemode.Server.Models;
|
|
using ReallifeGamemode.Server.Services;
|
|
using ReallifeGamemode.Server.Util;
|
|
using System.Linq;
|
|
|
|
namespace ReallifeGamemode.Server.Commands
|
|
{
|
|
class UserCommands : Script
|
|
{
|
|
[Command("accept", "~m~Benutzung: ~s~/accept [invite]")]
|
|
public void CmdUserAccept(Client player, string option)
|
|
{
|
|
if (!player.IsLoggedIn()) return;
|
|
|
|
option = option.ToLower();
|
|
|
|
switch (option)
|
|
{
|
|
case "invite":
|
|
{
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[Command("car", "~m~Benutzung: ~s~/car")]
|
|
public void CmdUserCar(Client player)
|
|
{
|
|
if (!player.IsLoggedIn()) return;
|
|
if (!player.IsInVehicle) return;
|
|
|
|
Vehicle pVeh = player.Vehicle;
|
|
|
|
if (pVeh.GetServerVehicle() is ServerVehicle veh)
|
|
{
|
|
if (player.GetUser().IsAdmin(AdminLevel.SUPPORTER))
|
|
{
|
|
player.SendChatMessage("~m~" + ((VehicleHash)pVeh.Model) + " | " + veh.ToString() + " | Farbe 1: " + pVeh.PrimaryColor + " | Farbe 2: " + pVeh.SecondaryColor + " | ID: " + pVeh.Handle.Value);
|
|
return;
|
|
}
|
|
}
|
|
player.SendChatMessage("~m~" + ((VehicleHash)pVeh.Model) + " | Farbe 1: " + pVeh.PrimaryColor + " | Farbe 2: " + pVeh.SecondaryColor + " | ID: " + pVeh.Handle.Value);
|
|
}
|
|
}
|
|
}
|