Donations:Packages

From GExtension Wiki
Revision as of 17:37, 18 March 2020 by Ibot3 (talk | contribs) (→‎Rewards)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Navigate to Admin -> Settings -> Donations -> Packages to create a package.

General

  • Description
    • This will be displayed as information for the package. We recommend to use "Unordered List".
  • Serverbundle
    • The bundle for which this package is for. Rewards will apply to all servers in this bundle.
  • Price
    • Custum Price: The user can decide how much to pay. In this case, the price will be the minimum amount.
  • Days
    • The duration of the package.
  • Rebuyable
    • Can this package get bought if the user already has an active instance of this package?
  • Category
    • Group multiple packages to make it easier to find a package.

Rewards

Assign rewards to the package here. Some further explainations:

  • Groups:
    • Assign a group for the user for each bundle. You can decide to either return to the old groups, return to custom groups or do nothing on expiration.
  • Teamspeak:
    • To assign a servergroup, just insert the name of it. You may decide to remove the group on expiration.
    • To create a channel for the user, you need the ID of the parent channel and the name of an channel admin group. You may decide to remove the channel on expiration. You can also prevent to create a new channel if the user already owns a channel. The existing channel will be extended in this case. See Teamspeak for more information.
  • Console Command and Custom Lua:
    • Take a look at the question marks on the right to get a list of available string replacements.
    • "executed directly (All Servers)": The command/code is executed once on each server as soon as the player connects (or instant if the player is connected)
    • "executed directly (One Server)": The command/code is executed on the first server the player connects to (or instant if the player is connected)
    • "executed on connect/player spawn": The command/code is executed whenenver the player connects/spawns
    • "executed on package expiration": The command/code is executed once on each server after package expiration

Example how to create a "premium" status without groups

1. Set the following code as reward for "Custom Lua (Connect)":

PLAYER:SetNWInt("gex_premium", 1)

2. Now you are able to check the "premium" status in any Lua script with:

if PLAYER:GetNWInt("gex_premium", 0) == 1 then

Please note that "PLAYER" in number 2 may differs in every script (sometimes ply). You can also use LocalPlayer() if you are on a clientside script.

Extra

Upgrade

  • If the user owns a package mentioned in this list and buys the current one, the old package will be disabled and the remaining days will be added to the new one.

Not Compatible With / Disable after buying

  • Description in the panel