Installation
How to install DigitalPets. Start it after ox_lib, oxmysql, your inventory, and Newb_Bridge.
Start this after ox_lib, oxmysql, your framework, your inventory, and Newb_Bridge. The bridge looks at what is already running, so if this script starts first it can miss them.
Dependencies
Newb_Bridge, ox_lib, oxmysql, and Server artifact and OneSync. There is no SQL file to import.
Add the item and image
There is one item, digital_pet. Paste it from Item setup, then copy digital_pet.png into your inventory's image folder.
| Inventory | Image folder |
|---|---|
| ox_inventory | ox_inventory/web/images/ |
| qb-inventory / ps-inventory | html/images/ |
| one_inventory | one_inventory/web/images/ |
More on icons: Item images.
Add to server.cfg
Swap qbx_core and ox_inventory for whatever you actually run.
ensure ox_lib
ensure oxmysql
ensure qbx_core
ensure ox_inventory
ensure Newb_Bridge
ensure MrNewb_DigitalPetsFirst start
Start the server. The settings table is created on its own, and the handheld prop streams from stream/ automatically.
Join as an admin and run /digitalpetssetup. The defaults are fine to launch with. Walk through the Overview page once so you know what is there. What each page does: Configuration.
Try it
Give yourself the item, use it, and wait for the egg to hatch (15 minutes by default). Shorten the hatch time on the Life page while you test. If you want a quick look at every species, /givealldigitalpets hands out one hatched pet of each.
Common setup mistakes
| Symptom | Check |
|---|---|
| Using the item does nothing | Newb_Bridge started after this resource, the item name does not match, or the item stacks |
| Item has no picture | digital_pet.png is not in your inventory's image folder |
| I renamed the item and it broke | Change the name in the inventory and in the panel's General page, save, then restart the resource |
| Blank screen after an update | web/build/ did not upload fully. Replace the whole folder, restart the resource, and clear the FiveM cache if needed |
| No handheld in hand | stream/ is missing, or an anticheat is deleting the model. See Anticheat models |
| Outings or spots never trigger | Capture the position with the panel's position button and keep the radius generous |