Skip to content

Eggs ​

Free edition Β· RedM Β· VORP included Β· Other frameworks via public adapters

rz_eggs adds configurable egg gathering to RedM, with shared nest availability, item rewards and respawn timers. This is the free edition, configured through its public files; it does not include the Herbs V2 management menu.

πŸ›’ Get Eggs for free

Version ​

Documented version: 1.0.9. Check the installed version in fxmanifest.lua. The console update checker uses the rz_eggs_free entry in RZ Releases.

Overview ​

  • Seven nest variants covering five egg items: duck, alligator, goose, loon and vulture.
  • Custom spawn coordinates and random selection between the variants assigned to a coordinate group.
  • Multiple configurable rewards per nest, with quantities and drop chances.
  • Distance-based rendering, configurable map blips and multiplayer synchronization.
  • Respawn timer, translations and optional Discord logs.
  • Included VORP integration and editable adapters for other frameworks.

Supported eggs ​

Composite definitionDefault reward
COMPOSITE_LOOTABLE_DUCK_EGG_5_DEF5 Γ— duckegg
COMPOSITE_LOOTABLE_GATOR_EGG_3_DEF3 Γ— gatoregg
COMPOSITE_LOOTABLE_GATOR_EGG_4_DEF4 Γ— gatoregg
COMPOSITE_LOOTABLE_GATOR_EGG_5_DEF5 Γ— gatoregg
COMPOSITE_LOOTABLE_GOOSE_EGG_4_DEF4 Γ— gooseegg
COMPOSITE_LOOTABLE_LOON_EGG_3_DEF3 Γ— loonegg
COMPOSITE_LOOTABLE_VULTURE_EGG_VARIATION_01_DEF1 Γ— vultureegg

Quantities above are the supplied defaults. Change item rewards in Config.LootReward; the composite definition controls the visible nest. Eggs does not provide Herbs' eating/effects system or spawn attacking animals.

Installation ​

  1. Claim the free package on Tebex and download it from your Cfx.re granted assets, using the account entitled to the resource.
  2. Put the rz_eggs resource folder inside resources, optionally in a category such as [rz]: for example resources/[rz]/rz_eggs.
  3. Inventory items β€” optional: you can use items already available in your inventory by selecting them in the reward configuration. To add the supplied items instead, use the ready-made public/eggs-vorp.sql for VORP and the icons in public/img/. Import only the items you need, checking your inventory schema and avoiding duplicates; add the corresponding icons if needed.
  4. Configure the public files listed below.
  5. Start the resource after its dependencies:
text
ensure oxmysql
ensure vorp_core
ensure vorp_inventory
ensure rz_eggs

For a custom framework, replace the VORP entries with your framework and inventory resources, and complete both adapters before using Config.Framework = "custom".

Requirements ​

VORP
  • vorp_core and vorp_inventory, started before Eggs.
  • Registered reward items and sufficient inventory capacity.
Other frameworks
  • A character system and inventory integration implemented in public/framework/.
  • A developer must connect the supplied template to the framework's real functions/events; selecting custom alone is not enough.
Required for all
  • A RedM server with OneSync enabled.
  • oxmysql: required by the current manifest, which also loads its server library.
  • Cfx entitlement for the protected resource.

Configuration ​

FilePurpose
public/config.luaFramework, language, render distance, respawn, egg definitions, blips and rewards
public/coords.luaCoordinate groups and available nest variants
public/language/en.luaIncluded English notifications and log labels
public/framework/client/Character-loaded event and client notifications
public/framework/server/Character access, inventory rewards and server notifications
public/eggs-vorp.sqlExample VORP inventory item definitions
public/img/Inventory icons
Main settings β€” public/config.lua
lua
Config.UsedLang = "en"
Config.Framework = "vorp" -- "custom" after completing the adapters
Config.WebhookUrl = "" -- Empty disables Discord logs
Config.Debug = false
Config.Render = 20.0 -- Rendering distance
Config.RespawnTimer = 20 -- Minutes after collection

Edit these existing fields; do not replace the whole file with this excerpt. Keep the initial Config = {} and Language = {} declarations.

Spawn & Coordinates ​

Edit Config.EggsCoords in public/coords.lua. Each group contains an eggs list and a coords list. At resource startup, the server selects one listed variant for each coordinate; it does not generate random positions across an area.

Coordinate group example
lua
Config.EggsCoords = {
    ducks = {
        eggs = {
            `COMPOSITE_LOOTABLE_DUCK_EGG_5_DEF`,
        },
        coords = {
            {x = 2464.36, y = -1399.3, z = 45.23},
            {x = 2435.98, y = -1431.85, z = 45.07},
        }
    }
}

This is a reduced example. Merge groups into your existing table to keep the other nests. Every variant must have matching entries in Config.Eggs and Config.LootReward. Keep each group's variant list non-empty and check ground height in game.

Blips ​

Each entry in Config.Eggs has a name and a blip table with visible, type and color. Use visible = false to hide that variant's marker. Review the supplied names: several entries currently share the default Duck Eggs label.

Rewards ​

Config.LootReward maps a nest's composite definition to its notification image and reward list. Items must already be registered in your inventory.

Multiple rewards example
lua
Config.LootReward[`COMPOSITE_LOOTABLE_DUCK_EGG_5_DEF`] = {
    img = {
        dict = "pm_collectors_bag_mp",
        texture = "provision_duck_egg"
    },
    rewards = {
        {item = "duckegg", count = 5, label = "Duck Egg", chance = 100},
        -- Register this extra item in your inventory before enabling it:
        -- {item = "feather", count = 1, label = "Feather", chance = 25},
    }
}

chance = 100 always passes the drop roll. The current implementation uses one roll per interaction, shared by all rewards; these are not independent rolls. Keep the entry with rewards = {} if you intentionally want no item rewards.

If at least one reward is attempted but no item can be added, the server restores nest availability. If the roll awards nothing or the reward list is empty, collecting the nest still starts its cooldown. If only some items are successfully added, the nest remains collected.

Multiplayer & Respawn ​

The server owns the collected state and validates the player, nest, distance and repeated requests before granting rewards. A collected nest becomes unavailable to other players. Nearby players receive removal updates; clients also request state changes periodically.

Config.RespawnTimer is in minutes. The server checks cooldowns once per minute, and client synchronization/rendering may add a short delay before the nest reappears.

Storage and performance ​

Positions come from public/coords.lua; collection state and cooldowns are held in memory and reset when the resource restarts. There is no SQL persistence of nest state or a UseSQL switch in this edition. The supplied SQL registers inventory items, while oxmysql remains a manifest dependency.

Nests render according to distance and clients maintain a nearby-nest cache. Measure resmon on your own setup: coordinate count, density, players and render distance affect usage.

Framework Integration ​

VORP ​

Set Config.Framework = "vorp". The included adapters use VORP character data, inventory capacity checks and item addition. Adjust these public files only if your VORP integration differs:

  • public/framework/client/vorp_cl.lua
  • public/framework/server/vorp_sv.lua

Other frameworks ​

Complete public/framework/client/custom_cl.lua and public/framework/server/custom_sv.lua, then select custom.

Adapter function/eventExpected integration
CustomSV.GetPlayer(source)Return a valid character/player value; nil/false rejects collection
CustomSV.GetPlayerName(source) / GetPlayerLastname(source)Character names used in logs
CustomSV.AddItem(src, item, count)Check capacity, add items, return a truthy value only on success
CustomSV.Notify(...) / CustomCL.Notify(...)Your notification system
Client character-loaded eventReplace the example customevent and trigger rz_eggs:playerLoaded when the character is ready

The custom adapter is a template, not a ready-made integration for every framework. Test full inventory, failed item addition and reconnects as well as normal collection.

Languages & Notifications ​

Duplicate public/language/en.lua, rename it (for example it.lua), change the table key to Language["it"], translate the values and set Config.UsedLang = "it". Preserve all keys. Restart the resource after changes.

Notification/log text is separate from reward label values and egg name values in config.lua. Native game interaction prompts may follow the player's game language.

Discord Logs ​

Set Config.WebhookUrl to your channel's webhook URL, or leave it empty to disable logs. Do not include a real webhook URL in screenshots or public configuration examples.

Updating ​

  1. Back up the resource, customized public files and inventory database before any SQL changes.
  2. Stop rz_eggs and obtain the complete new package from Cfx.
  3. Replace the old resource code with the new package. Updating only public/ leaves the old implementation installed.
  4. Compare the new public/ files with your backup and reapply your coordinates, rewards, translations and framework integration. Do not overwrite the new public folder blindly with the old one.
  5. Follow the release notes for any item/schema changes; do not reimport existing item rows unnecessarily.
  6. Start the dependencies/resource and test collection, rewards, full inventory, synchronization and cooldowns.

The update checker reports available versions; it does not install them. Keep rz_update_product "rz_eggs_free" in the supplied manifest to use the correct edition's update channel.

Troubleshooting ​

ProblemCheck
Resource does not startCfx entitlement, OneSync, oxmysql, folder structure and startup order
No nests visibleCoordinate height, configured variants, render distance, character-loaded event and cooldown
Collection gives no itemsExact inventory item names, capacity, reward chance and the return value of the custom AddItem function
EGG_LOOT_CONFIG_MISSINGThe composite is missing its Config.LootReward entry
EGG_LOOT_REWARDS_INVALIDThe reward entry needs a rewards table, even when empty
Names or notifications are wrongSelected language table, reward labels and egg names

Enable Config.Debug = true temporarily to inspect server collection logs, then disable it again. For support, include your resource version, framework, reproduction steps and relevant console errors in a Discord ticket.

Script documentation Β· RZ

RZ SUPPORT

Let’s figure it out.

Installation, configuration or a question before buying? Start here.

01
Read the guidesInstallation and step-by-step settings.
β†—
02
Open a ticket on DiscordJoin our server, then open a support ticket.
β†—

Describe the issue and include your script version. The team will reply in your ticket.