Add duty System and Duty Cloth

This commit is contained in:
VegaZ
2018-11-14 19:00:31 +01:00
parent f02ad2b93d
commit b4df50215d
17 changed files with 371 additions and 45 deletions

View File

@@ -17,8 +17,7 @@ namespace reallife_gamemode.Server.Managers
{
public class DoorManager : Script
{
[RemoteEvent("ChangeDoorState")]
public void ChangeDoorState(Client player)
public static void ChangeDoorState(Client player)
{
List<Door> NearDoors = new List<Door>();
var user = player.GetUser();

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Text;
using GTANetworkAPI;
using reallife_gamemode.Server.Entities;
namespace reallife_gamemode.Server.Managers
{
public class PositionManager : Script
{
public static List<DutyPoint> DutyPoints = new List<DutyPoint>();
public static List<ColShape> DutyColShapes = new List<ColShape>();
[ServerEvent(Event.ResourceStart)]
public void OnResourceStart()
{
DutyPoint dutyPointLSPD = new DutyPoint()
{
Position = new Vector3(458.24, -990.86, 30.68),
FactionId = 1
};
DutyPoints.Add(dutyPointLSPD);
foreach (DutyPoint d in DutyPoints)
{
NAPI.Marker.CreateMarker(1, new Vector3(d.Position.X, d.Position.Y, d.Position.Z - 2), new Vector3(d.Position.X, d.Position.Y, d.Position.Z + 1),
new Vector3(0,0,0), 3, new Color(255, 255, 255, 50), false, 0);
NAPI.TextLabel.CreateTextLabel("Stempeluhr - Dr\u00fccke ~y~E\n~s~Dienstkleidung - Dr\u00fccke ~y~K", d.Position, 7, 1, 0, new Color(255, 255, 255), false, 0);
}
}
}
public class DutyPoint
{
public Vector3 Position { get; set; }
public int FactionId { get; set; }
}
}

View File

@@ -19,7 +19,7 @@ namespace reallife_gamemode.Server.Managers
{
if(c.IsInVehicle)
{
c.TriggerEvent("showTuningInfo");
c.TriggerEvent("showTuningInfo", c.GetData("duty"));
}
};