nkt-referral 1.0.0 by nikartik assigns player referral codes and supports separate promo codes through an ox_lib menu. It uses license identifiers without a framework bridge. The supplied rewards use ox_inventory; receiving a reward is not established by the menu alone.
Install dependencies and configure rewards
Keep the nkt-referral folder and start ox_lib and oxmysql before ensure nkt-referral. Also start ox_inventory when retaining the bundled reward functions, or replace them with your own checked server integration. The README lists only Ox Lib, but the manifest imports oxmysql and rewards.lua calls the inventory.
Back up the database before first start: the resource creates referrals with identifier as its primary key, code and redeemed columns. The client obtains its code after startup and opens the menu with /refercode. Configure rewards in server/rewards.lua; retain default and uppercase custom code keys.
The intended rule is one other-player referral per player. Promo use is recorded separately per license in a JSON list for each promo, not as a single redemption globally. Deleting database rows resets those safeguards and can permit further rewards; it is not routine maintenance.
Fix redemption state and delivery
Self-referral and prior-redemption checks exist, but rely on PlayerCodes cached at initialization. Successful redemption does not update that cached flag. The database update is not conditional on being unredeemed, and there is no transaction or server cooldown. Use an atomic one-time claim and synchronize the cache before paying rewards.
Code normalization happens inside validation, while reward dispatch receives the original input. Use the same canonical code throughout. An offline code owner resolves to false, yet the source still calls that owner reward function. Queue offline rewards or skip them deliberately; do not pass a missing player to an inventory export.
Promo redemptions read and replace a shared JSON list without a transaction. Simultaneous requests can overwrite redemption records. Validate input types and player initialization, enforce unique code/claim records and check inventory success. Test duplicate and concurrent claims, offline owners, mixed-case input, reconnects and full inventories before release.
Reviewed on 11 September 2026 at revision 8c8fd7e76a851fd4a65a3e2330901fa950e76a3f. All Lua, manifest and README were inspected. No referral, promo claim, inventory reward or database reset was executed.