|
| 1 | +# sd-selfstorage |
| 2 | + |
| 3 | +sd-selfstorage is a comprehensive self-storage rental system for FiveM that allows players to rent or purchase storage units with advanced features including auto-renewal payments, access management, upgrades, and more. |
| 4 | +## Features |
| 5 | +- 🏢 **Rent or Purchase** - Players can either rent units weekly or buy them permanently |
| 6 | +- 💳 **Auto-Renewal System** - Automatic payments from bank accounts (configurable) |
| 7 | +- 👥 **Access Management** - Share storage access with other players |
| 8 | +- ⬆️ **Storage Upgrades** - Purchase additional slots and weight capacity |
| 9 | +- ⏰ **Grace Period System** - 48-hour grace period for overdue payments |
| 10 | +- 🏦 **Banking Integration** - Works with banking systems that support static identifiers |
| 11 | +- 🌍 **Multi-Language Support** - Easy localization system |
| 12 | +- 📦 **ox_inventory Integration** - Full stash system with weight and slot limits |
| 13 | + |
| 14 | +## Preview |
| 15 | +<img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/fd9b534a-89c9-4931-846d-b4d079fa8e7c" /> |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +<img width="1920" height="1080" alt="FiveM_GTAProcess_Wk93zMVrwo" src="https://github.com/user-attachments/assets/2727e1d3-c744-4c35-abb0-5da62e4f332f" /> |
| 20 | + |
| 21 | + |
| 22 | +## 🔔 Contact |
| 23 | + |
| 24 | +Author: Samuel#0008 |
| 25 | +Discord: [Join the Discord](https://discord.gg/FzPehMQaBQ) |
| 26 | +Store: [Click Here](https://fivem.samueldev.shop) |
| 27 | + |
| 28 | +## 💾 Installation |
| 29 | + |
| 30 | +1. Download the latest release from the repository |
| 31 | +2. Extract the downloaded file and rename the folder to `sd-selfstorage` |
| 32 | +3. Place the `sd-selfstorage` folder into your server's `resources` directory |
| 33 | +4. Add `ensure sd-selfstorage` to your `server.cfg` |
| 34 | +5. Configure the banking functions in `server/main.lua` (lines 14-37), if you want auto-renewal to work. |
| 35 | +6. Adjust the config file to your needs |
| 36 | + |
| 37 | +## 📖 Dependencies |
| 38 | +- [ox_inventory](https://github.com/overextended/ox_inventory) |
| 39 | +- [ox_lib](https://github.com/overextended/ox_lib) |
| 40 | +- [qbx_core](https://github.com/Qbox-project/qbx_core) or [qb-core](https://github.com/qbcore-framework/qb-core) |
| 41 | +- oxmysql |
| 42 | + |
| 43 | +## 📖 Configuration |
| 44 | + |
| 45 | +### Banking System Setup |
| 46 | +The script supports two modes depending on your banking system: |
| 47 | + |
| 48 | +#### For Banking Systems with Static Identifiers (IBAN, Account Numbers) |
| 49 | +```lua |
| 50 | +Banking = { |
| 51 | + hasStaticIdentifiers = true, |
| 52 | + noIdentifierMessage = 'Your banking system does not support automatic payments' |
| 53 | +} |
| 54 | +``` |
| 55 | + |
| 56 | +#### For Banking Systems without Static Identifiers |
| 57 | +```lua |
| 58 | +Banking = { |
| 59 | + hasStaticIdentifiers = false, |
| 60 | + noIdentifierMessage = 'Your banking system does not support automatic payments' |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +When `hasStaticIdentifiers = false`: |
| 65 | +- Auto-renewal features are disabled |
| 66 | +- Bank account linking is hidden |
| 67 | +- Only manual payments are available |
| 68 | +- Grace period and deletion systems still work |
| 69 | + |
| 70 | +### Banking Functions |
| 71 | +Edit the banking functions in `server/main.lua` (lines 14-37): |
| 72 | + |
| 73 | +```lua |
| 74 | +-- Example Integration with RxBanking |
| 75 | +Banking.GetPlayerAccount = function(identifier) |
| 76 | + local accountData = exports['RxBanking']:GetPlayerPersonalAccount(identifier) |
| 77 | + if type(accountData) == "table" then |
| 78 | + return accountData.iban |
| 79 | + elseif type(accountData) == "string" then |
| 80 | + return accountData |
| 81 | + end |
| 82 | + return nil |
| 83 | +end |
| 84 | + |
| 85 | +Banking.RemoveAccountMoney = function(accountId, amount, unitId) |
| 86 | + return exports['RxBanking']:RemoveAccountMoney( |
| 87 | + accountId, |
| 88 | + amount, |
| 89 | + 'payment', |
| 90 | + locale('storage_unit_autorenewal', { id = unitId }), |
| 91 | + nil |
| 92 | + ) |
| 93 | +end |
| 94 | +``` |
| 95 | + |
| 96 | +## 📜 License |
| 97 | +This resource is protected by copyright. Redistribution or modification without permission is prohibited. |
| 98 | + |
| 99 | +## 🤝 Support |
| 100 | +For support, join our [Discord](https://discord.gg/FzPehMQaBQ) or create an issue on GitHub. |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
0 commit comments