🛠️Setup

This is a detailed setup guide for Advanced Job+ID Card Script. If you have any questions before making a purchase, you can contact us on Discord

Setting Up the Script

  1. This script can be used with both the target system (qb-target, ox_target) and the menu (qb-menu, ox_lib, esx)

  2. CodeStudio.UseMetaData Enable this if you want to use metadata-based ID cards, which have unique IDs that contain information about the person who owns them. For example, if you steal someone else's ID, it will display information about the main person who owns the ID *Note that your inventory must support metadata. Otherwise, set this to false

  3. Customize ID Issuing Location: You can restrict the location for multiple jobs and issue multiple IDs at the same location, as well as have multiple locations for the same

  4. The Player Management Menu includes all the IDs you create in CodeStudio.DefaultID, although you can customize what is displayed in the menu. However, any customization should be based on CodeStudio.DefaultID. Similarly, Job Management includes all the items you put in CodeStudio.JobCards to manage cards

  5. Customize Management Menus: You can restrict player and job management menus access based on multiple jobs and grades, and enable a job+player management menu. Additionally, you can have multiple locations for the same

  6. You can customize ID cards and job badges/cards in detail using the editing template provided below. Additionally, you can set card expiry by specifying the number of days in the configuration. If you don't want cards to expire, set expireCard to false (*Disable any other script that you have to issue or give ID cards Example (qb-inventroy which issues id_card and qb-cityhall which you have to customize: Events and Exports))

  7. The script comes with an automatic SQL creator and automatically makes items usable. Simply register your ID card or job card items into your server after setting up the script

Events and Exports

Client Side

  1. Open Player Manage Menu
    TriggerEvent('cs:idcard:openPlayerMenu')
  2. Open Job Manage Menu
    TriggerEvent('cs:idcard:openJobMenu', job_name)
  3. Event to give ID/Job Cards from different resources [This will check if a player issued card]:

    TriggerEvent('cs:idcard:getCard', card_name)
  4. Export to check whether a player has a certain card:

    exports['cs_idcard']:CheckID(card_name)

Server Side

  1. Export to check whether a player has a certain card (server side):

    exports['cs_idcard']:CheckID(Player_ID, card_name)
  2. Export to give ID/Job Cards from different resources (server side):

    exports['cs_idcard']:GiveCard(Player_ID, card_name)
  3. Event to Register ID/Job Card To a Player:

    exports['cs_idcard']:RegisterCard(Player_ID, card_name, addItem)
    
    Player_ID = Server ID of Player
    card_name = Card Name which you want to issue (Ex. id_card, drive_card)
    addItem = If you want to give that card as an item
    
    Example:
    exports['cs_idcard']:RegisterCard(source, 'id_card', true)
  4. Event to Remove/Deregister ID/Job Card From a Player:

    exports['cs_idcard']:RemoveCard(Player_ID, card_name)
    
    Player_ID = Server ID of Player
    card_name = Card Name which you want to issue (Ex. id_card, drive_card)
    
    Example:
    exports['cs_idcard']:RemoveCard(source, 'id_card')

Last updated