converted jobs to same system as businesses, add option to choose job at cityhall

This commit is contained in:
hydrant
2019-05-16 14:52:19 +02:00
parent 8fd4041b3c
commit aa81fa95a4
18 changed files with 1422 additions and 59 deletions

View File

@@ -1,4 +1,5 @@
using GTANetworkAPI;
using Newtonsoft.Json;
using ReallifeGamemode.Server.Entities;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Server.Models;
@@ -22,7 +23,8 @@ namespace ReallifeGamemode.Server.Managers
var colShape = NAPI.ColShape.CreateSphereColShape(_cityHallPosition, 1.0f);
colShape.OnEntityEnterColShape += (s, c) =>
{
c.TriggerEvent("SERVER:CityHall_ShowHelpText");
var jobs = JobManager.GetJobs().Select(j => j.Name).ToArray();
c.TriggerEvent("SERVER:CityHall_ShowHelpText", JsonConvert.SerializeObject(jobs));
};
colShape.OnEntityExitColShape += (s, c) =>