Esempio n. 1
0
 private static void loginResponse(dynamic result, params object[] arguments)
 {
     lock (loginResponseObject)
     {
         try
         {
             if (result.ContainsKey("userAuth") && result["userAuth"] == true)
             {
                 onlineUsername = "";
                 if (result.ContainsKey("userName"))
                 {
                     onlineUsername = (string)result["userName"];
                 }
                 isLogged = true;
                 LiveTicker.AddTicker("I'm now On-Duty");
                 ExperienceManager.UpdateExp(5, "Login Bonus");
                 ExperienceManager.SelectPlayerInfo();
                 NotificationManager.addNotification("[~b~Police~s~Life~r~S~s~]: You have been ~g~successfully~s~ logged in ~b~Officer " + onlineUsername);
             }
             else
             {
                 NotificationManager.addNotification("[~b~Police~s~Life~r~S~s~]: ~r~You have a invalid Token, 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)");
             }
         }
         catch (Exception ex)
         {
             Game.LogTrivial(ex.ToString());
         }
     }
 }