Commands
This section lists all available commands included in the script. Each command is designed to simplify administration, player interaction, or debugging tasks. You’ll find detailed descriptions, usage examples, and permission requirements to help you manage and customize your server efficiently.
| Command | Description |
/closeinv | Closes the player's inventory instantly. |
/inventory | Opens the player's inventory instantly. |
/hotbar | Opens the player's hotbar instantly. |
/handsup | Raise your hands and enable the button to draw from said player if you open the inventory. |
/searchplayer | Search the nearest player to steal or check their items. |
/randomitems | Test command that will give you a random amount of items, used for general testing. |
/resetinv [id] | Resets the selected player's inventory. |
/clearinv [id] | Clears the selected player's inventory and leaves it completely empty. |
/giveitem [id] [item] [count] | Deliver items to a specific player, selecting his id, item name and quantity. |
/giveweapon [id] [weapon] [ammo] | Deliver only weapons, you must select the id, weapon and number of ammo. |
/repairweapon [id] | Repairs the weapons of the selected player through his id, all weapons go to 100% durability. |
/openinventorytarget [id] | Administrative command to check the inventory of a target player. |
/admin_giveitem | The interactive menu opens to give items in a personalized way. |
/inventoryAddXP [id] [skillCount] | Add XP for other players. |
Client Exports
This section provides all available client exports for the script. These functions allow you to interact directly with the system from the client side, enabling custom features, UI interactions, and integrations with other resources. Each export includes a short description and usage example for easy implementation.
Below you can find the server-side function that continues this guide. Opens stash from the client and sets it as the current active stash.
The stashId must exactly match the identifier that was registered on the server, otherwise the system will not be able to find the correct stash. Additionally, the stash must already exist before attempting to open it; if it has not been created or registered beforehand, the inventory will simply fail to open.
Server Exports
This section provides all available server exports for the script. These functions allow developers to interact with the system from the server side, manage data, trigger actions, and integrate with other resources. Each export includes a clear description and a practical example to simplify its implementation.
This returns the total number of inventory slots that are occupied by items for the specified player.
This creates a stash with the specified identifier, number of slots, and weight capacity for the specified player. Stashes can be used for custom storage solutions like personal lockers or organizational armories.
This export enables you to manage stashes efficiently by dynamically adding items while respecting the stash's slot and weight limitations.
This export ensures efficient management of stash contents by removing specified items while respecting slot and weight parameters.
This retrieves all items in the specified stash, including their slot, name, and quantity, for further processing or display.
This adds the item 'sandwich' to slot 1 of the trunk identified by the vehicle's plate, with a quantity of 1.
This removes the item 'sandwich' from slot 1 of the trunk identified by the vehicle's plate, triggered by the given player source.
This command clears the stash identified by the name 'inventory_stash_example'. The first parameter 'stash' indicates the inventory type (it could be 'trunk', 'glovebox', etc.). Once executed, all items inside that stash will be permanently removed.
This function replaces the old plate 'LI3WDCRV' with the new one 'KVT78I33'.
The first parameter is the current plate of the vehicle, and the second parameter is the new plate you want to assign.
Once executed, any inventory or storage data linked to the old plate will now be reassigned to the new one, maintaining consistency and preventing data conflicts.
Registers a stash linked to the player who executes the command.
source is the player source registering the stash, stashId is the unique identifier of the stash, 50 represents the number of available slots, and 10000 defines the maximum weight the stash can hold.
Removes a specific item from an existing stash.
Usage: /inventory:removeItemFromStash item amount.
Adds an item to an existing stash.
Usage: /inventory:addItemToStash item amount.
