├── .gitattributes ├── .vs └── BankSystem │ └── v16 │ └── .suo ├── BankSystem.sln ├── BankSystem ├── BankSystem.csproj ├── Config.cs ├── Main.cs ├── Managers │ ├── AccountManager.cs │ └── ControlManager.cs ├── Models │ ├── Account.cs │ └── Screen.cs ├── Properties │ └── AssemblyInfo.cs └── obj │ ├── Debug │ ├── .NETFramework,Version=v4.6.1.AssemblyAttributes.cs │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ ├── BankSystem.csprojAssemblyReference.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ └── build.force │ └── Release │ ├── .NETFramework,Version=v4.6.1.AssemblyAttributes.cs │ ├── BankSystem.csproj.CopyComplete │ ├── BankSystem.csproj.CoreCompileInputs.cache │ ├── BankSystem.csproj.FileListAbsolute.txt │ ├── BankSystem.csprojAssemblyReference.cache │ ├── BankSystem.dll │ └── BankSystem.pdb ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.vs/BankSystem/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AloshaPlugins/UnturnedBankSystem/78da969bd9c2584fc47425fd176da4365d94584d/.vs/BankSystem/v16/.suo -------------------------------------------------------------------------------- /BankSystem.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30523.141 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BankSystem", "BankSystem\BankSystem.csproj", "{873CDEFB-B2F5-47AE-A856-04C49B24C7AD}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {873CDEFB-B2F5-47AE-A856-04C49B24C7AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {873CDEFB-B2F5-47AE-A856-04C49B24C7AD}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {873CDEFB-B2F5-47AE-A856-04C49B24C7AD}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {873CDEFB-B2F5-47AE-A856-04C49B24C7AD}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {6E2C536C-29E6-4207-AA3C-A618AD3F4190} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /BankSystem/BankSystem.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {873CDEFB-B2F5-47AE-A856-04C49B24C7AD} 8 | Library 9 | Properties 10 | BankSystem 11 | BankSystem 12 | v4.6.1 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned_Data\Managed\Assembly-CSharp.dll 37 | 38 | 39 | ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned_Data\Managed\Assembly-CSharp-firstpass.dll 40 | 41 | 42 | ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Unturned\Extras\Rocket.Unturned\Rocket.API.dll 43 | 44 | 45 | ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Unturned\Extras\Rocket.Unturned\Rocket.Core.dll 46 | 47 | 48 | ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Unturned\Extras\Rocket.Unturned\Rocket.Unturned.dll 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned_Data\Managed\UnityEngine.dll 60 | 61 | 62 | ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned_Data\Managed\UnityEngine.CoreModule.dll 63 | 64 | 65 | ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned_Data\Managed\UnityEngine.PhysicsModule.dll 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /BankSystem/Config.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using BankSystem.Models; 7 | using Rocket.API; 8 | using Steamworks; 9 | 10 | namespace BankSystem 11 | { 12 | public class Config : IRocketPluginConfiguration 13 | { 14 | public ushort Effect, ATM; 15 | public int AccountLimit; 16 | public List Accounts; 17 | public void LoadDefaults() 18 | { 19 | Effect = 47532; 20 | ATM = 61356; 21 | AccountLimit = 5; 22 | Accounts = new List(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /BankSystem/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using BankSystem.Managers; 7 | using Rocket.Core.Plugins; 8 | using Rocket.Unturned; 9 | using Rocket.Unturned.Events; 10 | using Rocket.Unturned.Player; 11 | using SDG.Unturned; 12 | using Steamworks; 13 | using UnityEngine; 14 | 15 | namespace BankSystem 16 | { 17 | public class Main : RocketPlugin 18 | { 19 | public static Main Instance; 20 | protected override void Load() 21 | { 22 | Instance = this; 23 | EffectManager.onEffectButtonClicked += ControlManager.OnButtonClicked; 24 | EffectManager.onEffectTextCommitted += ControlManager.OnTextTyped; 25 | UnturnedPlayerEvents.OnPlayerUpdateGesture += UnturnedPlayerEventsOnOnPlayerUpdateGesture; 26 | U.Events.OnPlayerDisconnected += EventsOnOnPlayerDisconnected; 27 | } 28 | 29 | private void EventsOnOnPlayerDisconnected(UnturnedPlayer player) 30 | { 31 | ControlManager.Screens.RemoveAll(screen => screen.Id == player.CSteamID); 32 | } 33 | 34 | private void UnturnedPlayerEventsOnOnPlayerUpdateGesture(UnturnedPlayer player, UnturnedPlayerEvents.PlayerGesture gesture) 35 | { 36 | if (gesture != UnturnedPlayerEvents.PlayerGesture.PunchLeft) return; 37 | var raycast = Physics.Raycast(new Ray(player.Player.look.aim.position, player.Player.look.aim.forward), out var info, 38 | 5f, RayMasks.STRUCTURE | RayMasks.STRUCTURE_INTERACT); 39 | if (!raycast) return; 40 | 41 | var hit = info; 42 | if (hit.transform == null) return; 43 | 44 | var flag = StructureManager.tryGetInfo(hit.transform, out var x, out var y, out var index, out var region); 45 | if (!flag) return; 46 | var structer = region.structures[index]; 47 | 48 | if (structer.structure.id != Configuration.Instance.ATM) return; 49 | ControlManager.ShowCardsUI(player.Player); 50 | } 51 | 52 | protected override void Unload() 53 | { 54 | Instance = null; 55 | EffectManager.onEffectButtonClicked -= ControlManager.OnButtonClicked; 56 | EffectManager.onEffectTextCommitted -= ControlManager.OnTextTyped; 57 | UnturnedPlayerEvents.OnPlayerUpdateGesture -= UnturnedPlayerEventsOnOnPlayerUpdateGesture; 58 | U.Events.OnPlayerDisconnected -= EventsOnOnPlayerDisconnected; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /BankSystem/Managers/AccountManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.CompilerServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using BankSystem.Models; 8 | 9 | namespace BankSystem.Managers 10 | { 11 | public static class AccountManager 12 | { 13 | public static List GetPlayerToAccounts(ulong id) => 14 | Main.Instance.Configuration.Instance.Accounts.Where(account => account.Id == id).ToList(); 15 | 16 | public static Account GetAccount(int id) => 17 | Main.Instance.Configuration.Instance.Accounts.FirstOrDefault(accont => accont.AccountId == id); 18 | 19 | public static List GetHistoriesPage(List histories, int page, int count) => 20 | histories.Skip(page * count - count).Take(page * count).ToList(); 21 | 22 | 23 | public static Account CreateAccount(Account account) 24 | { 25 | Main.Instance.Configuration.Instance.Accounts.Add(account); 26 | Save(); 27 | return account; 28 | } 29 | 30 | public static void AddAction(Account account, string str, DateTime time) 31 | { 32 | account.Histories.Add($"[{time.ToLongDateString()}] {str}"); 33 | Save(); 34 | } 35 | 36 | public static void Save() => Main.Instance.Configuration.Save(); 37 | public static int NewAccountId() 38 | { 39 | int id; 40 | while (true) 41 | { 42 | id = new Random().Next(1000, 9999); 43 | if (Main.Instance.Configuration.Instance.Accounts.Any(account => account.AccountId == id)) continue; 44 | else break; 45 | } 46 | 47 | return id; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /BankSystem/Managers/ControlManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using BankSystem.Models; 8 | using Rocket.Unturned.Player; 9 | using SDG.Unturned; 10 | using Steamworks; 11 | using UnityEngine; 12 | using Screen = BankSystem.Models.Screen; 13 | 14 | namespace BankSystem.Managers 15 | { 16 | public static class ControlManager 17 | { 18 | private const string Prefix = "BNK_"; 19 | private const short Key = 457; 20 | public static List Screens = new List(); 21 | 22 | public static void OnButtonClicked(Player player, string buttonName) 23 | { 24 | if (!buttonName.StartsWith(Prefix)) return; 25 | buttonName = buttonName.Substring(Prefix.Length); 26 | 27 | var Id = player.channel.owner.playerID.steamID; 28 | var screen = Screens.FirstOrDefault(s => s.Id == Id); 29 | if (screen == null) 30 | { 31 | CloseUI(player); 32 | return; 33 | } 34 | 35 | var untPlayer = UnturnedPlayer.FromPlayer(player); 36 | if (buttonName == "Yatir_100") 37 | { 38 | if (untPlayer.Experience < 100) return; 39 | untPlayer.Experience -= 100; 40 | screen.Account.Price += 100; 41 | AccountManager.Save(); 42 | ShowMainUI(player, screen.Account); 43 | return; 44 | } 45 | if (buttonName == "Cek_100") 46 | { 47 | if (screen.Account.Price < 100) return; 48 | untPlayer.Experience += 100; 49 | screen.Account.Price -= 100; 50 | AccountManager.Save(); 51 | ShowMainUI(player, screen.Account); 52 | return; 53 | } 54 | if (buttonName == "Havale") 55 | { 56 | EffectManager.sendUIEffectVisibility(Key, Id, true, "Transfer_Money", true); 57 | MultipleVisibility(Id, new string[] 58 | { 59 | "Select_Card", 60 | "Select_Card_Add", 61 | "Deposit_Money", 62 | "Withdraw_Money", 63 | "Main" 64 | }); 65 | return; 66 | } 67 | 68 | if (buttonName == "Cek") 69 | { 70 | EffectManager.sendUIEffectVisibility(Key, Id, true, "Withdraw_Money", true); 71 | MultipleVisibility(Id, new string[] 72 | { 73 | "Select_Card", 74 | "Select_Card_Add", 75 | "Deposit_Money", 76 | "Transfer_Money", 77 | "Main" 78 | }); 79 | return; 80 | } 81 | if (buttonName == "Yatir") 82 | { 83 | EffectManager.sendUIEffectVisibility(Key, Id, true, "Deposit_Money", true); 84 | MultipleVisibility(Id, new string[] 85 | { 86 | "Select_Card", 87 | "Select_Card_Add", 88 | "Withdraw_Money", 89 | "Transfer_Money", 90 | "Main" 91 | }); 92 | return; 93 | } 94 | 95 | if (buttonName == "CardAdd") 96 | { 97 | if (screen.Accounts.Count + 1 > Main.Instance.Configuration.Instance.AccountLimit) return; 98 | var account = new Account() 99 | { 100 | Id = Id.m_SteamID, 101 | AccountId = AccountManager.NewAccountId(), 102 | Histories = new List(), 103 | Price = 0 104 | }; 105 | AccountManager.CreateAccount(account); 106 | screen.Account = account; 107 | screen.Accounts.Add(account); 108 | ShowMainUI(player, screen.Account); 109 | return; 110 | } 111 | 112 | if (buttonName == "Card") 113 | { 114 | var account = GetNext(screen.Accounts, screen.Page); 115 | if (account == null) 116 | { 117 | ShowAddCardUI(player); 118 | return; 119 | } 120 | screen.Account = account; 121 | ShowMainUI(player, screen.Account); 122 | return; 123 | } 124 | 125 | if (buttonName == "Transfer_Success") 126 | { 127 | if (string.IsNullOrEmpty(screen.Response1)) 128 | { 129 | SendError(Id, "HATA: Bu alan boş.", "Transfer_ErrorMessage_0", 10); 130 | return; 131 | } 132 | if (string.IsNullOrEmpty(screen.Response2)) 133 | { 134 | SendError(Id, "HATA: Bu alan boş.", "Transfer_ErrorMessage_1", 10); 135 | return; 136 | } 137 | 138 | var price = uint.Parse(screen.Response1); 139 | var id = int.Parse(screen.Response2); 140 | 141 | var account = AccountManager.GetAccount(id); 142 | if (account == null) 143 | { 144 | ShowMainUI(player, screen.Account); 145 | return; 146 | } 147 | 148 | screen.Account.Price -= price; 149 | account.Price += price; 150 | 151 | AccountManager.Save(); 152 | screen.Response2 = string.Empty; 153 | screen.Response1 = string.Empty; 154 | ShowMainUI(player, screen.Account); 155 | return; 156 | } 157 | 158 | if (buttonName == "Cek_Success") 159 | { 160 | if (string.IsNullOrEmpty(screen.Response1)) 161 | { 162 | SendError(Id, "HATA: Buraya bir değer girmelisin.", "Cek_ErrorMessage_0", 10); 163 | return; 164 | } 165 | 166 | var price = uint.Parse(screen.Response1); 167 | screen.Account.Price -= price; 168 | UnturnedPlayer.FromPlayer(player).Experience += price; 169 | 170 | AccountManager.Save(); 171 | screen.Response2 = string.Empty; 172 | screen.Response1 = string.Empty; 173 | 174 | ShowMainUI(player, screen.Account); 175 | return; 176 | } 177 | 178 | if (buttonName == "Yatir_Success") 179 | { 180 | if (string.IsNullOrEmpty(screen.Response1)) 181 | { 182 | SendError(Id, "HATA: Buraya bir değer girmelisin.", "Yatir_ErrorMessage_0", 10); 183 | return; 184 | } 185 | 186 | var price = uint.Parse(screen.Response1); 187 | 188 | UnturnedPlayer.FromPlayer(player).Experience -= price; 189 | screen.Account.Price += price; 190 | 191 | AccountManager.Save(); 192 | screen.Response2 = string.Empty; 193 | screen.Response1 = string.Empty; 194 | 195 | ShowMainUI(player, screen.Account); 196 | return; 197 | } 198 | 199 | if (buttonName == "Back") 200 | { 201 | if (screen.Page - 1 <= 0) return; 202 | screen.Page -= 1; 203 | ShowCardsUI(player); 204 | return; 205 | } 206 | 207 | if (buttonName == "Next") 208 | { 209 | var account = GetNext(screen.Accounts, screen.Page + 1); 210 | if (account == null) 211 | { 212 | screen.Page += 1; 213 | ShowAddCardUI(player); 214 | 215 | return; 216 | } 217 | screen.Page += 1; 218 | ShowCardsUI(player); 219 | return; 220 | } 221 | 222 | if (buttonName == "Menu") 223 | { 224 | ShowMainUI(player, screen.Account); 225 | return; 226 | } 227 | 228 | if (buttonName == "Close") 229 | { 230 | CloseUI(player); 231 | return; 232 | } 233 | 234 | if (buttonName == "Cards") 235 | { 236 | ShowCardsUI(player); 237 | return; 238 | } 239 | } 240 | 241 | public static void OnTextTyped(Player player, string buttonName, string text) 242 | { 243 | if (!buttonName.StartsWith(Prefix)) return; 244 | buttonName = buttonName.Substring(Prefix.Length); 245 | var untPlayer = UnturnedPlayer.FromPlayer(player); 246 | 247 | var Id = player.channel.owner.playerID.steamID; 248 | var screen = Screens.FirstOrDefault(s => s.Id == Id); 249 | if (screen == null) 250 | { 251 | CloseUI(player); 252 | return; 253 | } 254 | 255 | 256 | if (buttonName == "Transfer_Player") 257 | { 258 | if (!int.TryParse(text, out var result)) 259 | { 260 | SendError(Id, "HATA: Bu alana sadece bir hesap numarası girebilirsin.", "Transfer_ErrorMessage_1", 5); 261 | return; 262 | } 263 | 264 | var account = AccountManager.GetAccount(result); 265 | if (account == null) 266 | { 267 | SendError(Id, $"HATA: Belirtmiş olduğun {result} numaralı bir hesap bulamadım. Geçerli bir hesap gir.", "Transfer_ErrorMessage_1", 10); 268 | return; 269 | } 270 | 271 | screen.Response2 = text; 272 | SendError(Id, $" Hesap numarası geçerli.", "Transfer_ErrorMessage_1", 10); 273 | return; 274 | } 275 | 276 | if (buttonName == "Transfer_Price") 277 | { 278 | if (string.IsNullOrEmpty(text)) 279 | { 280 | SendError(Id, "HATA: Buraya boş bir değer giremezsin. Geçerli bir miktar gir.", "Transfer_ErrorMessage_0", 5); 281 | return; 282 | } 283 | 284 | if (!uint.TryParse(text, out var result)) 285 | { 286 | SendError(Id, "HATA: Bu alana sadece geçerli bir miktar girebilirsin.", "Transfer_ErrorMessage_0", 5); 287 | return; 288 | } 289 | 290 | if (screen.Account.Price < result) 291 | { 292 | SendError(Id, $"HATA: Üzgünüm ancak hesabında bu kadar para yok. Mevcut bakiyen: ${screen.Account.Price}", "Transfer_ErrorMessage_0", 5); 293 | return; 294 | } 295 | 296 | screen.Response1 = text; 297 | SendError(Id, $" Fiyat geçerli geçerli.", "Transfer_ErrorMessage_0", 10); 298 | return; 299 | } 300 | 301 | if (buttonName == "Cek_Input") 302 | { 303 | if (!uint.TryParse(text, out var result)) 304 | { 305 | SendError(Id, "HATA: Bu alana sadece geçerli bir miktar girebilirsin.", "Cek_ErrorMessage_0", 5); 306 | return; 307 | } 308 | 309 | if (screen.Account.Price < result) 310 | { 311 | SendError(Id, $"HATA: Üzgünüm ancak hesabında bu kadar para yok. Mevcut bakiyen: ${screen.Account.Price}", "Cek_ErrorMessage_0", 5); 312 | return; 313 | } 314 | 315 | screen.Response1 = text; 316 | SendError(Id, $" Miktar geçerli.", "Cek_ErrorMessage_0", 10); 317 | return; 318 | } 319 | 320 | if (buttonName == "Yatir_Input") 321 | { 322 | if (!uint.TryParse(text, out var result)) 323 | { 324 | SendError(Id, "HATA: Bu alana sadece sayı girebilirsin.", "Yatir_ErrorMessage_0", 5); 325 | return; 326 | } 327 | 328 | if (untPlayer.Experience < result) 329 | { 330 | SendError(Id, $"HATA: Üzgünüm ancak üzerinde bu kadar para yok. Mevcut bakiyen: ${untPlayer.Experience}", "Yatir_ErrorMessage_0", 5); 331 | return; 332 | } 333 | 334 | screen.Response1 = text; 335 | SendError(Id, $" Miktar geçerli.", "Yatir_ErrorMessage_0", 10); 336 | return; 337 | } 338 | } 339 | 340 | public static void SendError(CSteamID Id, string text, string child, float time) 341 | { 342 | EffectManager.sendUIEffectText(Key, Id, true, child, text); 343 | Main.Instance.StartCoroutine(ErrorDuration(Id, child, time)); 344 | } 345 | 346 | private static IEnumerator ErrorDuration(CSteamID Id, string child, float time) 347 | { 348 | yield return new WaitForSeconds(time); 349 | EffectManager.sendUIEffectText(Key, Id, true, child, " "); 350 | } 351 | 352 | public static void ShowMainUI(Player player, Account account) 353 | { 354 | SetModal(player, true); 355 | var Id = player.channel.owner.playerID.steamID; 356 | var untPlayer = UnturnedPlayer.FromPlayer(player); 357 | 358 | EffectManager.sendUIEffectText(Key, Id, true, "BNK_Name", untPlayer.DisplayName); 359 | EffectManager.sendUIEffectText(Key, Id, true, "BNK_Price", account.Price.ToString()); 360 | EffectManager.sendUIEffectText(Key, Id, true, "BNK_X", "CÜZDAN: " + untPlayer.Experience.ToString()); 361 | EffectManager.sendUIEffectVisibility(Key, Id, true, "Main", true); 362 | 363 | MultipleVisibility(Id, new string[] 364 | { 365 | "Select_Card", 366 | "Select_Card_Add", 367 | "Deposit_Money", 368 | "Withdraw_Money", 369 | "Transfer_Money" 370 | }); 371 | 372 | } 373 | 374 | public static void ShowCardsUI(Player player) 375 | { 376 | SetModal(player, true); 377 | var Id = player.channel.owner.playerID.steamID; 378 | MultipleVisibility(Id, new string[] 379 | { 380 | "Main", 381 | "Select_Card_Add", 382 | "Deposit_Money", 383 | "Withdraw_Money", 384 | "Transfer_Money" 385 | }); 386 | var screen = GetScreenOrCreate(Id); 387 | if (!screen.ISended) 388 | { 389 | EffectManager.sendUIEffect(Main.Instance.Configuration.Instance.Effect, Key, Id, true); 390 | screen.ISended = true; 391 | } 392 | var account = GetNext(screen.Accounts, screen.Page); 393 | if (account == null) 394 | { 395 | ShowAddCardUI(player); 396 | return; 397 | } 398 | EffectManager.sendUIEffectText(Key, Id, true, "BNK_Select_Card_Text", $" ID: {account.AccountId} | BAKIYE: ${account.Price}"); 399 | EffectManager.sendUIEffectVisibility(Key, Id, true, "Select_Card", true); 400 | } 401 | 402 | public static void ShowAddCardUI(Player player) 403 | { 404 | SetModal(player, true); 405 | var Id = player.channel.owner.playerID.steamID; 406 | // EffectManager.sendUIEffect(Main.Instance.Configuration.Instance.Effect, Key, Id, true); 407 | EffectManager.sendUIEffectVisibility(Key, Id, true, "Select_Card_Add", true); 408 | MultipleVisibility(Id, new string[] 409 | { 410 | "Select_Card", 411 | "Main", 412 | "Deposit_Money", 413 | "Withdraw_Money", 414 | "Transfer_Money" 415 | }); 416 | } 417 | 418 | public static void MultipleVisibility(CSteamID Id, string[] close) 419 | { 420 | foreach (var s in close) 421 | { 422 | EffectManager.sendUIEffectVisibility(Key, Id, true, s, false); 423 | } 424 | } 425 | 426 | public static void CloseUI(Player player) 427 | { 428 | SetModal(player, false); 429 | Screens.RemoveAll(screen => screen.Id == player.channel.owner.playerID.steamID); 430 | EffectManager.askEffectClearByID(Main.Instance.Configuration.Instance.Effect, player.channel.owner.playerID.steamID); 431 | } 432 | 433 | public static Screen GetScreenOrCreate(CSteamID Id) 434 | { 435 | var screen = Screens.FirstOrDefault(s => s.Id == Id); 436 | if (screen == null) 437 | { 438 | screen = new Screen(Id, 1, null); 439 | screen.Accounts = Main.Instance.Configuration.Instance.Accounts.Where(ac => ac.Id == Id.m_SteamID) 440 | .ToList(); 441 | Screens.Add(screen); 442 | } 443 | return screen; 444 | } 445 | 446 | public static Account GetNext(List list, int page) => list.Skip(page - 1).Take(1).FirstOrDefault(); 447 | public static void SetModal(Player player, bool activity) => 448 | player.setPluginWidgetFlag(EPluginWidgetFlags.Modal, activity); 449 | } 450 | } -------------------------------------------------------------------------------- /BankSystem/Models/Account.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BankSystem.Models 8 | { 9 | public class Account 10 | { 11 | public int AccountId; 12 | 13 | public ulong Id; 14 | public uint Price; 15 | public List Histories; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /BankSystem/Models/Screen.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Steamworks; 7 | 8 | namespace BankSystem.Models 9 | { 10 | public class Screen 11 | { 12 | public CSteamID Id; 13 | public Account Account; 14 | public int Page; 15 | public List Accounts; 16 | public bool ISended = false; 17 | public string Response1 = string.Empty, Response2 = string.Empty; 18 | public Screen(CSteamID id, int page, Account account) 19 | { 20 | Id = id; 21 | Page = page; 22 | this.Account = account; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /BankSystem/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Bir bütünleştirilmiş koda ilişkin Genel Bilgiler aşağıdaki öznitelikler kümesiyle 6 | // denetlenir. Bütünleştirilmiş kod ile ilişkili bilgileri değiştirmek için 7 | // bu öznitelik değerlerini değiştirin. 8 | [assembly: AssemblyTitle("BankSystem")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("BankSystem")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // ComVisible özniteliğinin false olarak ayarlanması bu bütünleştirilmiş koddaki türleri 18 | // COM bileşenleri için görünmez yapar. Bu bütünleştirilmiş koddaki bir türe 19 | // erişmeniz gerekirse ComVisible özniteliğini o türde true olarak ayarlayın. 20 | [assembly: ComVisible(false)] 21 | 22 | // Bu proje COM'un kullanımına sunulursa, aşağıdaki GUID tür kitaplığının kimliği içindir 23 | [assembly: Guid("873cdefb-b2f5-47ae-a856-04c49b24c7ad")] 24 | 25 | // Bir derlemenin sürüm bilgileri aşağıdaki dört değerden oluşur: 26 | // 27 | // Ana Sürüm 28 | // İkincil Sürüm 29 | // Yapı Numarası 30 | // Düzeltme 31 | // 32 | // Tüm değerleri belirtebilir veya varsayılan Derleme ve Düzeltme Numaralarını kullanmak için 33 | // aşağıda gösterildiği gibi '*' kullanabilirsiniz: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /BankSystem/obj/Debug/.NETFramework,Version=v4.6.1.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")] 5 | -------------------------------------------------------------------------------- /BankSystem/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] 5 | -------------------------------------------------------------------------------- /BankSystem/obj/Debug/BankSystem.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AloshaPlugins/UnturnedBankSystem/78da969bd9c2584fc47425fd176da4365d94584d/BankSystem/obj/Debug/BankSystem.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /BankSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AloshaPlugins/UnturnedBankSystem/78da969bd9c2584fc47425fd176da4365d94584d/BankSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /BankSystem/obj/Debug/build.force: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AloshaPlugins/UnturnedBankSystem/78da969bd9c2584fc47425fd176da4365d94584d/BankSystem/obj/Debug/build.force -------------------------------------------------------------------------------- /BankSystem/obj/Release/.NETFramework,Version=v4.6.1.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")] 5 | -------------------------------------------------------------------------------- /BankSystem/obj/Release/BankSystem.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AloshaPlugins/UnturnedBankSystem/78da969bd9c2584fc47425fd176da4365d94584d/BankSystem/obj/Release/BankSystem.csproj.CopyComplete -------------------------------------------------------------------------------- /BankSystem/obj/Release/BankSystem.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 5393d6c8027ac766cca2e5a4a7c23603bd777710 2 | -------------------------------------------------------------------------------- /BankSystem/obj/Release/BankSystem.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\BankSystem.dll 2 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\BankSystem.pdb 3 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Assembly-CSharp-firstpass.dll 4 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Assembly-CSharp.dll 5 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Rocket.API.dll 6 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Rocket.Core.dll 7 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Rocket.Unturned.dll 8 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.CoreModule.dll 9 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.dll 10 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.PhysicsModule.dll 11 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.TextRenderingModule.dll 12 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.IMGUIModule.dll 13 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.AnimationModule.dll 14 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.AudioModule.dll 15 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Unity.TextMeshPro.dll 16 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.AssetBundleModule.dll 17 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.TerrainModule.dll 18 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.VehiclesModule.dll 19 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.ParticleSystemModule.dll 20 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UI.dll 21 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.WindModule.dll 22 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.TerrainPhysicsModule.dll 23 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Newtonsoft.Json.dll 24 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Unity.Postprocessing.Runtime.dll 25 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UnityWebRequestModule.dll 26 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UIModule.dll 27 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Pathfinding.JsonFx.dll 28 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Pathfinding.ClipperLib.dll 29 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Pathfinding.Ionic.Zip.Reduced.dll 30 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\Pathfinding.Poly2Tri.dll 31 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.ScreenCaptureModule.dll 32 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.ImageConversionModule.dll 33 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.JSONSerializeModule.dll 34 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.Physics2DModule.dll 35 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UnityWebRequestTextureModule.dll 36 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.CrashLog.dll 37 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.VRModule.dll 38 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.SharedInternalsModule.dll 39 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.ClothModule.dll 40 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.AccessibilityModule.dll 41 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.AIModule.dll 42 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.ClusterInputModule.dll 43 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.ClusterRendererModule.dll 44 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.DirectorModule.dll 45 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.GridModule.dll 46 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.LocalizationModule.dll 47 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.SpriteMaskModule.dll 48 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.SpriteShapeModule.dll 49 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.StreamingModule.dll 50 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.StyleSheetsModule.dll 51 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.TilemapModule.dll 52 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UnityConnectModule.dll 53 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UnityWebRequestAudioModule.dll 54 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.VFXModule.dll 55 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.VideoModule.dll 56 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UNETModule.dll 57 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.GameCenterModule.dll 58 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.InputModule.dll 59 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.TextCoreModule.dll 60 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UIElementsModule.dll 61 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UnityAnalyticsModule.dll 62 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UnityWebRequestAssetBundleModule.dll 63 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.UnityWebRequestWWWModule.dll 64 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.XRModule.dll 65 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.ARModule.dll 66 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.CrashReportingModule.dll 67 | C:\Users\arma5\source\repos\BankSystem\BankSystem\bin\Release\UnityEngine.PerformanceReportingModule.dll 68 | C:\Users\arma5\source\repos\BankSystem\BankSystem\obj\Release\BankSystem.csprojAssemblyReference.cache 69 | C:\Users\arma5\source\repos\BankSystem\BankSystem\obj\Release\BankSystem.csproj.CoreCompileInputs.cache 70 | C:\Users\arma5\source\repos\BankSystem\BankSystem\obj\Release\BankSystem.csproj.CopyComplete 71 | C:\Users\arma5\source\repos\BankSystem\BankSystem\obj\Release\BankSystem.dll 72 | C:\Users\arma5\source\repos\BankSystem\BankSystem\obj\Release\BankSystem.pdb 73 | -------------------------------------------------------------------------------- /BankSystem/obj/Release/BankSystem.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AloshaPlugins/UnturnedBankSystem/78da969bd9c2584fc47425fd176da4365d94584d/BankSystem/obj/Release/BankSystem.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /BankSystem/obj/Release/BankSystem.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AloshaPlugins/UnturnedBankSystem/78da969bd9c2584fc47425fd176da4365d94584d/BankSystem/obj/Release/BankSystem.dll -------------------------------------------------------------------------------- /BankSystem/obj/Release/BankSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AloshaPlugins/UnturnedBankSystem/78da969bd9c2584fc47425fd176da4365d94584d/BankSystem/obj/Release/BankSystem.pdb -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 iiAlosha 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnturnedBankSystem 2 | 3 | --------------------------------------------------------------------------------