RedM
  • πŸ‡«πŸ‡·Home
  • πŸ§‘β€πŸŒΎAmbient NPC
  • β›ΊCampement
  • πŸƒCard Collection
  • β™ŸοΈChess & Checkers Game
  • πŸ’£Dynamite
  • πŸ™‹Environment animations
  • πŸ”₯Fire sync
  • 🐎Feeding Horse + Syringe
  • 🚭Illicit Sales
  • βš–οΈInstances
  • πŸ“₯Market Stall
  • 🩺Medical Records
  • 🍲Metabolism
  • πŸ—£οΈMumble Block UI
  • ⏸️Pause Menu
  • ⌨️Quick Keys Menu
  • πŸ’΅Reward Loyalty and Total playtime
  • πŸ–‹οΈTattoo
  • πŸ₯‡Top Serveurs
  • ⚰️Undertaker
  • πŸ’€Wanted
  • πŸ”«Weapon Cleaning Animation
  • 🏹Weapon Rack
Powered by GitBook
On this page

Card Collection

Steps to Add a New Card to the System and to use /collection command.

First start :

1 - Apply collections.sql
2 - Copy the cards in the folder "html/collections" into "vorp_inventory/html/img/items"
3 - Start the script and wait the automatic insertion of cards.
4 - Restart your server (to update vorp inventory img and items).

Add a new card or collection

1. Define the New Card in the Config.Cards Table

  • Open the script configuration file.

  • Add the new card identifier to the desired collection in the Config.Cards table.

  • Each collection can contain up to 6 cards.

Example:

If you're adding a card bt_6.png to the new Botilus collection:

Config.Cards = {
    ["Botilus"] = { -- Existing or new Collection
        "bt_1", -- Existing card
        "bt_2",
        "bt_3", 
        "bt_4",
        "bt_5",
        "bt_6" -- New card added
    },
    -- Other collections
}

2. Add the Card Image

You must provide a visual representation of the card by placing its image in the appropriate folders.

Image Requirements:

  • Dimensions: The card image must be 150x220 pixels.

  • Image Format: Supported format is.png

File Locations:

  1. Place the card image in the following folder: html/collections

  2. Copy the same card image into this folder for inventory use: vorp_inventory/html/img/items

3. Enable Automatic Database Insertion (Optional)

If you want the script to automatically add the new card to the database:

  • Ensure Config.AllowAutoInsertInDB is set to true in the configuration file.

4. Test the Card

Once the above steps are complete:

  • Restart the server.

  • Check that the card appears in the correct collection in the system.

  • Ensure the inventory displays the correct image for the card.


Description of the /collection Admin Command

The /collection command is an administrative tool that allows authorized users to manage card locations in the game world. This command can be used to place a card from a specific collection at the admin's current position.

Command Syntax

/collection <collection_name> <card_name>

Parameters:

  • <collection_name>: The name of the card collection (e.g., Far West, Indian, etc.).

  • <card_name>: The specific card identifier within the selected collection (e.g., fw_1, volcae_2, etc.).


  • Displays Available Collections and Cards:

    • If no arguments are provided, the command will display all available collection names.

    • If only a collection name is provided, the command will list all cards within that collection.

  • Places a Card in the Game World:

    • When both collection_name and card_name are provided, the command places the specified card at the admin's current location.

    • The card's position is saved to the database, including its coordinates (x, y, z).

  • Automatic Update of Spawned Cards:

    • After placing a card, the list of spawned cards is updated and synchronized with all connected clients.

  • Database Insertion:

    • The command ensures that the card's location is recorded in the collections table in the database. This includes:

      • The name of the collection.

      • The name of the card.

      • The card's exact coordinates in JSON format.

  • Validation:

    • Checks if the card and collection exist in the configuration (Config.Cards) before attempting to place the card.

    • Prevents duplication by ensuring that the card does not already exist at the specified location.

Last updated 5 months ago

πŸƒ