❔FAQ

Can I open the menu with something other than the chat command?

Yes! You can utilize the following client event to open the menu however you wish (ex: radialmenu, use item, etc): "wp-animals:client:openMenu"

-- Example: Calling from the client
TriggerEvent("wp-animals:client:openMenu")

-- Example: Calling from the server, where source is the target client
TriggerClientEvent("wp-animals:client:openMenu", source)

How can I edit the script to use an item for the cost instead of using money?

This can easily be done with some modifications to the PayForItemAndReturnStatusfunction (located in the framework.lua file). This is useful if you want to use items such as "paid for" coupons to exchange for pets.

Here are the high level changes you can make:

  • Update the pricefields in Config.Animals, changing it to the name of the item that you want to use. Example: price = "petcoupon"

  • Update PayForItemAndReturnStatus function

    • First check if the player has the item in their inventory

    • If they do have the item, remove it from their inventory and return true

    • If they do not have the item, notify them that it requires this specific item and return false

Here is an example of what this could look like:

NOTE: You will need to replace HasItem with the correct functions that your inventory script uses.

If you try to just copy paste this, it will NOT work because that is a pseudo code function provided for the purpose of this example.

How do I update the Animal shop location?

Update the coords on Config.AnimalStore in the Config.

NOTE: Don't forget to adjust the minZ and maxZ to be below/above the Z coordinate!

Last updated