public static void SelectPlayerInfo() { if (PlayerAuthenticate.isLogged) { var postData = new List <KeyValuePair <string, string> >(); postData.Add(new KeyValuePair <string, string>("Methode", "GetPlayerData")); var responseObject = new WebRequestManager.RequestResponseObject(); responseObject.handler = new WebRequestManager.getWebRequestResponse(playerDataResponse); WebRequestManager.SendResponse(postData, responseObject); } }
public static void addArrestedPeds(int count, bool inShift) { if (PlayerAuthenticate.isLogged && count > 0) { var postData = new List <KeyValuePair <string, string> >(); postData.Add(new KeyValuePair <string, string>("Methode", "AddArrestedPeds")); postData.Add(new KeyValuePair <string, string>("ArrestedPeds", count.ToString())); var responseObject = new WebRequestManager.RequestResponseObject(); responseObject.handler = new WebRequestManager.getWebRequestResponse(arrestedPedResponse); WebRequestManager.SendResponse(postData, responseObject); } }
public static void UpdateExp(int exp, string reason, bool displayNotification = true) { if (PlayerAuthenticate.isLogged) { var postData = new List <KeyValuePair <string, string> >(); postData.Add(new KeyValuePair <string, string>("Methode", "UpdateEXP")); postData.Add(new KeyValuePair <string, string>("Exp", exp.ToString())); postData.Add(new KeyValuePair <string, string>("Reason", reason)); var responseObject = new WebRequestManager.RequestResponseObject(); responseObject.handler = new WebRequestManager.getWebRequestResponse(expResponse); responseObject.arguments = new object[] { displayNotification, }; WebRequestManager.SendResponse(postData, responseObject); } }
public static void OnTimerEvent(object obj, ElapsedEventArgs e, MyPlayer myPlayer) { HungerManager.UpdatePlayerLife(myPlayer); // Online saves if (PlayerAuthenticate.isLogged && PlayerAuthenticate.playOnline == "true") { if (Game.LocalPlayer.Character.IsInAnyVehicle(false)) { var position = Game.LocalPlayer.Character.Position; LiveTicker.AddTicker("I'm on Duty, on <font color=\"Orange\">" + World.GetStreetName(position) + "</font>"); } var postData = new List <KeyValuePair <string, string> >(); postData.Add(new KeyValuePair <string, string>("Methode", "SaveDaten")); postData.Add(new KeyValuePair <string, string>("Money", myPlayer.playerMoney.ToString())); var responseObject = new WebRequestManager.RequestResponseObject(); responseObject.handler = new WebRequestManager.getWebRequestResponse(saveDatenResponse); WebRequestManager.SendResponse(postData, responseObject); } }