Exemplo n.º 1
0
        public void register_markerzones()
        {
            //Create locker.
            Locker.Create();

            if (Locker != MarkerZone.None)
            {
                Locker.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                        c.LockerZoneGroup = this;
                    }
                };
                Locker.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                        c.LockerZoneGroup = Group.None;
                    }
                };
            }

            FrontDesk.Create();

            if (FrontDesk != MarkerZone.None)
            {
                FrontDesk.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                    }
                };
                FrontDesk.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                    }
                };
            }

            ArrestLocation.Create();

            if (ArrestLocation != MarkerZone.None)
            {
                ArrestLocation.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                    }
                };
                ArrestLocation.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                    }
                };
            }
        }