Spynixx Client Portal
Documentation Menu
DocumentationLauncher Rewards System

Launcher Rewards System

Give verified launcher players one permanent first-use package, then repeat the configured package every five launcher playing hours.

Get the Complete Rewards Package

Get the latest INI-based reward system, launcher verification filterscript, required socket files, and step-by-step server documentation from the official repository.

View Package on GitHub

When Rewards Are Applied

  1. The filterscript verifies the player during OnPlayerConnect.
  2. On the verified player's first OnPlayerSpawn, it calls SpynixxLauncher_OnDetected in the gamemode.
  3. The unified include waits 3 seconds, checks saved reward progress, and grants the full package only when eligible.
  4. The first-use package is permanent. Reconnecting, respawning, or restarting the server cannot claim it again.
  5. While verified through the launcher, one minute is added to the player's saved launcher playtime. The package is awarded again every 5 completed hours.
No manual condition is required: You do not need to place PlayerUsingSpynixxLauncher inside OnPlayerSpawn. Loading the filterscript and including spynixxlauncher.inc activates the built-in claim and playtime flow.

Default Rewards

$2,500 Cash

100 Health

50 Armour

pawno/include/spynixxlauncher.inc
// pawno/include/spynixxlauncher.inc
new SpynixxGlobalRewards[][E_SPYNIXX_GLOBAL_REWARD] =
{
    {SPYNIXX_REWARD_MONEY,  2500, "[+] Spynixx Launcher Reward: $%d cash"},
    {SPYNIXX_REWARD_HEALTH,  100, "[+] Spynixx Launcher Reward: Full Health"},
    {SPYNIXX_REWARD_ARMOUR,   50, "[+] Spynixx Launcher Reward: %d Armour"}
};

The complete table is one package. By default, the player receives $2,500 cash, 100 health, and 50 armour together on first use, then receives the same complete package at 5, 10, 15, 20, and every succeeding five launcher hours.

Saved Progress and Automatic Setup

The include automatically creates one readable file at scriptfiles/spynixxlauncher_rewards.ini on the first reward check. No SQL import, SQLite viewer, or MySQL migration is required. New players become sections inside this same file rather than creating a separate file for every player.

Reward interval and progress file
// First-use reward: awarded once automatically
// Milestone reward: repeat the package every 5 launcher playing hours
#define SPYNIXX_REWARD_EVERY_HOURS   (5)

// One readable progress file created automatically inside scriptfiles/
#define SPYNIXX_REWARD_FILE          "spynixxlauncher_rewards.ini"
INI valuePurpose
first_claimedPrevents the one-time package from being claimed again.
minutesStores verified launcher playtime across reconnects and server restarts.
last_milestonePrevents an already completed five-hour milestone from paying twice.
Launcher hours only: Time advances only while the player is connected and verified through Spynixx Launcher. This counter is separate from the gamemode's general playing-hours value.

Readable INI Example

scriptfiles/spynixxlauncher_rewards.ini
; Spynixx Launcher reward progress - generated automatically

[Yasin]
first_claimed=1
minutes=620
last_milestone=2

[Player_2]
first_claimed=1
minutes=45
last_milestone=0

In this example, Yasin already claimed the starter package, accumulated 620 minutes, and received milestones 1 and 2 at five and ten hours. The next package is due at 15 hours.

Player-name identity: Saved records are matched by player name because this standalone include does not access the gamemode account UID. Renaming a player creates a new record unless an administrator renames the matching INI section too.

Compile and Deploy

Editing the .inc or .pwn source alone does not update a running server. Compile and deploy both AMX files, then perform a full server restart.

Required compiled outputs
pawncc filterscripts/spynixxlauncher.pwn
pawncc gamemodes/main.pwn

// Deploy/restart with both newly compiled files:
// filterscripts/spynixxlauncher.amx
// gamemodes/main.amx
If the old .db still appears: The server is running an older main.amx that still contains the SQLite implementation. The current source writes only spynixxlauncher_rewards.ini. The old .db is not imported automatically; archive it until the new INI behavior has been verified.

Supported Reward Types

ConstantEffect
SPYNIXX_REWARD_MONEYCalls your GivePlayerCash(playerid, amount) function when available; otherwise uses GivePlayerMoney.
SPYNIXX_REWARD_HEALTHSets the player's health to the configured amount.
SPYNIXX_REWARD_ARMOURCalls your SetScriptArmour(playerid, amount) function when available; otherwise uses SetPlayerArmour.

Only these three reward types exist in the current include. Weapon and custom-callback reward constants are not part of this implementation.

Customize Rewards

  1. Open pawno/include/spynixxlauncher.inc.
  2. Edit the entries in SpynixxGlobalRewards. Use a positive amount; entries with an amount of 0 or less are skipped.
  3. Keep each message within the table's 72-character storage limit. Use %d where the amount should appear.
  4. To change the interval, edit SPYNIXX_REWARD_EVERY_HOURS. For example, use (1) for hourly rewards.
  5. Recompile gamemodes/main.pwn, because the reward table and execution code are compiled into the gamemode.
Custom reward example
new SpynixxGlobalRewards[][E_SPYNIXX_GLOBAL_REWARD] =
{
    {SPYNIXX_REWARD_MONEY,  5000, "[Launcher] You received $%d."},
    {SPYNIXX_REWARD_HEALTH,  100, "[Launcher] Your health was restored."},
    {SPYNIXX_REWARD_ARMOUR,  100, "[Launcher] You received %d armour."}
};

How One Reward Is Processed

This money example comes from SpynixxLauncher_GiveOneReward. It first tries the gamemode's custom GivePlayerCash function, falls back to GivePlayerMoney, and then sends the configured reward message.

SPYNIXX_REWARD_MONEY processor sample
// Sample: how one MONEY reward entry is processed
case SPYNIXX_REWARD_MONEY:
{
    if(!CallLocalFunction("GivePlayerCash", "ii", playerid, amount))
    {
        GivePlayerMoney(playerid, amount);
    }

    if(SpynixxGlobalRewards[index][spyRewardMsg][0])
    {
        format(msg, sizeof msg,
            SpynixxGlobalRewards[index][spyRewardMsg], amount);
        SendClientMessage(playerid, -1, msg);
    }
}

Gamemode Compatibility

For economy systems that define GivePlayerCash, the include uses it before falling back to the native money function. Armour systems can expose SetScriptArmour in the same way. This keeps the launcher reward synchronized with compatible custom account and armour systems.

Reward timing: The initial eligibility check runs 3 seconds after the verified first spawn. Milestone checks run once per connected launcher minute. If another spawn system changes health or armour afterward, review that system's timing.