Changed duty medic update, added command to change vehicle livery (/vlivery)

This commit is contained in:
hydrant
2018-12-08 15:13:17 +01:00
parent a5269637c3
commit d3f026630a
3 changed files with 44 additions and 23 deletions

View File

@@ -51,7 +51,15 @@ namespace reallife_gamemode.Server.Events
player.SendNotification("Du bist nun ~g~im Dienst.");
if (player.GetUser().FactionId == 2) //Fire Department
{
NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", true);
int medicCount = 0;
foreach(Client c in NAPI.Pools.GetAllPlayers())
{
if((c.GetUser()?.GetFaction().Id ?? 0) == 2)
{
medicCount++;
}
}
NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", medicCount);
}
switch (factionId)
{