public void SaveCurrentPed() { int currentPedHashKey = Game.Player.Character.Model.GetHashCode(); PedHash currentPedHash = (PedHash)Game.Player.Character.Model.Hash; string saveName = currentPedHash.ToString(); Ped[] nearbypeds = World.GetNearbyPeds(Game.Player.Character.Position, 1); foreach (Ped ped in nearbypeds) { if (ped.Model.Hash != Game.Player.Character.Model.Hash) { currentPedHashKey = nearbypeds[0].Model.GetHashCode(); currentPedHash = (PedHash)nearbypeds[0].Model.Hash; saveName = currentPedHash.ToString(); } } //pedNames.Add(saveName); //pedHashkeyList.Add(currentPedHashKey); //listOfPeds.Add(saveName); saveName = Game.GetUserInput(WindowTitle.PM_NAME_CHALL, 20); //Write var p = new XElement("PED", new XElement("PEDNAME", saveName), new XElement("ID", currentPedHashKey) ); pedHashTable.Add(p); xml.Save(@"scripts//TeamDeathmatch.xml"); UI.ShowSubtitle("Saved " + saveName + ". Available from next loading."); }
public static void SetDealerLocation(GTA.Math.Vector3 Position, float Rotation, PedHash pedHash) { Dealer Dealer = new Dealer(Position.X, Position.Y, Position.Z, Rotation, pedHash.ToString()); DealerDB.AddDealer(Dealer); UIHelper.ShowNotification("Added new dealer location"); }
public Dealer(PedHash pedHash) { Name = RandomNames.GetRandomName(); X = 85.50f; Y = -1959.43f; Z = 21.12f; R = 344.75f; PedName = pedHash.ToString(); }
public void setskin(Client player, string IDOrName, PedHash Model) { AccountController account = player.getData("ACCOUNT"); if (account == null) { return; } if (AdminController.AdminRankCheck("setskin", account)) { AccountController targetAccount = EntityManager.GetUserAccount(player, IDOrName); if (targetAccount == null) { API.sendChatMessageToPlayer(player, "~r~[ERROR]: ~w~You specified an invalid player ID."); } else { API.setPlayerSkin(targetAccount.Client, Model); API.shared.sendChatMessageToPlayer(targetAccount.Client, "Administrator " + account.CharacterController.FormatName + " set your skin to: " + Model.ToString()); targetAccount.CharacterController.Character.Model = Model.GetHashCode(); } } }
public PedHashObject(PedHash hash) { this.Name = hash.ToString(); this.Value = (uint)hash; }