Stuyk/altv-athena

/getitem - Also get items by `dbName`

Stuyk opened this issue · 2 comments

Stuyk commented

Currently the /getitem command only gets items based on their actual name.

Needs to support fetching items by dbName which can be done with this function:

static async get(dbItemName: string): Promise<Item | null> {

  • Make the /getitem check through ItemFactory.get first.
  • If the result is undefined or null
  • Try fetching by name
  • if still undefined or null; tell the player it was not found

because I am somehow motivated... i can do it

Should support quantity param as well instead of default 1