Launcher Rewards System
Give verified launcher players one permanent first-use package, then repeat the configured package every five launcher playing hours.
Get the latest INI-based reward system, launcher verification filterscript, required socket files, and step-by-step server documentation from the official repository.
When Rewards Are Applied
- The filterscript verifies the player during
OnPlayerConnect. - On the verified player's first
OnPlayerSpawn, it callsSpynixxLauncher_OnDetectedin the gamemode. - The unified include waits
3 seconds, checks saved reward progress, and grants the full package only when eligible. - The first-use package is permanent. Reconnecting, respawning, or restarting the server cannot claim it again.
- While verified through the launcher, one minute is added to the player's saved launcher playtime. The package is awarded again every
5completed hours.
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
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.
// 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 value | Purpose |
|---|---|
| first_claimed | Prevents the one-time package from being claimed again. |
| minutes | Stores verified launcher playtime across reconnects and server restarts. |
| last_milestone | Prevents an already completed five-hour milestone from paying twice. |
Readable INI Example
; Spynixx Launcher reward progress - generated automatically
[Yasin]
first_claimed=1
minutes=620
last_milestone=2
[Player_2]
first_claimed=1
minutes=45
last_milestone=0In 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.
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.
pawncc filterscripts/spynixxlauncher.pwn
pawncc gamemodes/main.pwn
// Deploy/restart with both newly compiled files:
// filterscripts/spynixxlauncher.amx
// gamemodes/main.amxmain.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
| Constant | Effect |
|---|---|
| SPYNIXX_REWARD_MONEY | Calls your GivePlayerCash(playerid, amount) function when available; otherwise uses GivePlayerMoney. |
| SPYNIXX_REWARD_HEALTH | Sets the player's health to the configured amount. |
| SPYNIXX_REWARD_ARMOUR | Calls 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
- Open
pawno/include/spynixxlauncher.inc. - Edit the entries in
SpynixxGlobalRewards. Use a positive amount; entries with an amount of0or less are skipped. - Keep each message within the table's
72-character storage limit. Use%dwhere the amount should appear. - To change the interval, edit
SPYNIXX_REWARD_EVERY_HOURS. For example, use(1)for hourly rewards. - Recompile
gamemodes/main.pwn, because the reward table and execution code are compiled into the gamemode.
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.
// 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.