Beispiel #1
0
        public ELS()
        {
            controlConfiguration = new configuration.ControlConfiguration();
            _FileLoader          = new FileLoader(this);
            _sirenManager        = new SirenManager();

            EventHandlers["onClientResourceStart"] += new Action <string>(
                (string obj) =>
            {
                try
                {
                    if (obj != CurrentResourceName())
                    {
                        _FileLoader.RunLoadeer(obj);
                    }
                    else if (obj == CurrentResourceName())
                    {
                        Screen.ShowNotification($"Welcome {LocalPlayer.Name}  to ELS FiveM\n\n ELS FiveM is Licensed under LGPL 3.0\n\nMore inforomation can be found at http://fivem-scripts.net");

                        // BaseScript.Delay(5000);
                        _FileLoader.RunLoadeer(obj);
                        Tick += Class1_Tick;
                    }
                }
                catch (Exception e)
                {
                    TriggerServerEvent($"ONDEBUG", e.ToString());
                    Screen.ShowNotification($"ERROR:{e.Message}");
                    Tick -= Class1_Tick;
                    throw;
                }

                //_spotLight= new SpotLight();
            });
            EventHandlers["ELS:SirenUpdated"] += new Action <int, string, bool>(_sirenManager.UpdateSirens);

            EventHandlers["onPlayerJoining"] += new Action(() =>
            {
            });
        }
Beispiel #2
0
 public ELS()
 {
     _sirenManager = new SirenManager();
     Tick         += Class1_Tick;
 }