Beispiel #1
0
 public static void AddTicker(string message)
 {
     if (PlayerAuthenticate.isLogged)
     {
         if (!_tickerList.Exists(x => x.message.Equals(message)))
         {
             LiveTick newMessage = new LiveTick();
             var      postData   = new List <KeyValuePair <string, string> >();
             postData.Add(new KeyValuePair <string, string>("Methode", "SendTicker"));
             postData.Add(new KeyValuePair <string, string>("TickerMessage", message));
             newMessage.Data    = postData;
             newMessage.message = message;
             var responseObject = new WebRequestManager.RequestResponseObject();
             responseObject.handler     = new WebRequestManager.getWebRequestResponse(tickerResponse);
             newMessage.responseHandler = responseObject;
             _tickerList.Add(newMessage);
         }
     }
 }
Beispiel #2
0
        public static void Login()
        {
            IniReader playOnlineIni = new IniReader("Plugins/LSPDFR/PoliceLifeS/PoliceLifeS.ini", "Account", "online", "true");

            playOnline = playOnlineIni.getIniOption();

            if (playOnline == "true")
            {
                var postData = new List <KeyValuePair <string, string> >();
                postData.Add(new KeyValuePair <string, string>("Methode", "LoginCall"));
                var responseObject = new WebRequestManager.RequestResponseObject();
                responseObject.handler = new WebRequestManager.getWebRequestResponse(loginResponse);
                WebRequestManager.SendResponse(postData, responseObject);
            }
            else
            {
                isLogged       = false;
                onlineUsername = "";
                NotificationManager.addNotification("[~b~Police~s~Life~r~S~s~]: ~r~You disabled the Online-Mode, your data will not be updated with our Server. ~w~Visit http://PoliceLifeS.de for more Infos");
                Game.DisplayHelp("In our online mode, you have more options (EXP System, Callout Statistics and more)");
            }
        }