Raised This Month: $32 Target: $400
 8% 

Game-coin.com billing


Post New Thread Reply   
 
Thread Tools Display Modes
Author
mad_hamster
Member
Join Date: Nov 2009
Plugin ID:
2611
Plugin Version:
1.0.1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Bill players on your game server through Game-coin.com (Keywords: money, cash, donations, premium)
    Unapprover:
    Reason for Unapproving:
    Plugins requiring use of a third-party pay service may not be approved.
    Old 10-21-2011 , 04:53   Game-coin.com billing
    Reply With Quote #1

    Game-coin.com billing

    Bill players on your game servers


    NEW! Refer Game-coin to game servers and receive a part of our commission from their profits. See http://Game-coin.com/Ref


    Introduction


    What is Game-coin?

    Game-coin.com is a service that enables you to bill players that play on your game servers by the minute. You can define exactly who is billed, when, and how much. For example, you can let players play 1 hour for free every day and bill them for extra time. Or, only let paying players enter your server when it’s full. Or, give paying players special privileges.

    How does it work?

    For players:

    Players create an account at Game-coin.com, add cash to their e-wallet using a credit card or Skrill account (SMS and phone billing will be supported soon), associate one or more Steam IDs with their account, define which game servers can bill them and how much, and then connect to your game servers. Here are a few screenshots to illustrate this:

    Player's balance & recent payments:



    A payment details:



    Player's Steam IDs (left), recent servers he played on (middle), and favorite servers (right). Note that when a player plays on your server, your server will show up on that list and he can very easily allow your server to bill him by simply clicking the >> arrows. So players with existing Game-coin accounts are much more disposed to pay on your server than trying to convince a player to pay using other methods such as PayPal.



    Players can also search for game server by name, and see their stats:



    This is how the in-game menu looks like for players:




    For you (game server owner):

    On your part, you create an account at Game-coin.com, register your game servers, install our plugin on your servers and configure how you want to bill your players. When a player connects to your server, our plugin communicates with Game-coin and looks the player up by his Steam ID. If he’s registered and has allowed your server to bill him, then, depending on your billing settings, he’ll be billed by the minute. If he can’t be billed, he’ll be kicked from your server (or you could force him into spectator mode or put him in a prison cell or whatever you wish). Here's how your web panel looks like:

    Your game servers:



    Your upcoming payouts:



    In-depth stats for each server you own:




    How do I bill my players?

    Currently you've got 3 options:

    1. Trial time

    You can allow players to play up to X hours/day for free, after which they're kicked, unless they have a Game-coin account and allow your server to bill them, in which case they can continue playing beyond the first X hours and be billed by the minute. That way new players can try out your server(s), and when they're "hooked" you bill them for extra gaming hours.

    The trial time limit can apply on multiple servers, i.e. once a player has played a total of X hours across your game servers the limit kicks in. You can also reject players that have played over X hours today across all premium game servers using Game-coin worldwide. That prevents them from "hopping" from one premium server to another.

    This method is good for public servers/communities with dedicated players. It's bad for games such as TF2 where players can easily obtain multiple game accounts (Steam IDs) and switch between them to bypass the limit.


    2. Reserved slots

    Once your server gets full, or even half-full, you can restrict entry to paying players only. This is good for wildly-popular servers that are choke-full during peak hours.


    3. Restricted entry

    You can simply kick any non-paying players. This is good for private clan/match servers, or adults-only servers whose cost deters younger players.


    4. (available soon) VIP privileges

    You can grant paying players special privileges on your game server. This method will be available soon.

    Note that you can also use any combination of the above, or come up with your own billing plans. Our server-side plugin is highly modular and extensible. If you know a bit of Sourcemod programming, then you can easily customize it to your specific needs.


    What if I already accept donations & grant my donors VIP status?

    You can very easily add Game-coin as an additional billing option by simply adding a few lines of code to your existing VIP plugin(s), that grant VIP privileges to players that are currently paying you through Game-coin. See below for details (“Granting privileges to paying players”).

    The advantage of using Game-coin over (or in addition to) PayPal is that players have more billing options, do not need to pay 10$/€ - 20$/€ up front (they're billed by the minute), and can withdraw the money left in their e-wallet in case they get banned, your server disappears or they stop playing. This peace of mind translates to more paying players. In addition, you can perform much more refined billing using our highly customizable and extensible server-side plugin.


    What about teenagers without access to credit cards?

    That's becoming rare, with the increasing availability of pre-paid cards that can be bought at stores all over the world.

    Still, teenagers can charge their accounts with cash through Skrill, a SMS (upcoming) or a phone call (upcoming). We are also working on adding support for player sponsorships, meaning that a player can be funded by an older brother or friend. Between all these options, most players should be billable.


    How do I get my money?

    You can withdraw money from your Game-coin account into a Skrill account and from there transfer it to a credit card, a bank account, and more. Or, you can obtain a Skrill credit card (you don't need a bank account).


    When do I get paid?

    The revenues from your game servers will be deposited into your account daily, at a delay of 14 days. The reason for the delay is so we have time to process billing complaints from players.


    What are Game-coin's fees?

    We charge a 15.00% fee from your server profits. It funds the development of this service and of major new features that will substantially advance the premium game servers market.


    How much can I bill my players?

    We currently limit the rate at which players are billed to 0.2€/hour. Your servers can charge less than this, but not more (if your servers attempt to charge more, nothing bad will happen -- we'll just bill the maximum possible and your servers will ignore the error). This limit will rise gradually as our system matures.


    How do I install Game-coin on my game server?

    First, create a Game-coin account if you haven't already. Then register your server. Then follow the installation and configuration instructions below.
    Attached Files
    File Type: zip Game-coin_1.5.zip (204.4 KB, 275 views)

    Last edited by mad_hamster; 10-27-2011 at 15:03.
    mad_hamster is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 10-21-2011 , 04:54   Re: Game-coin.com billing
    Reply With Quote #2

    (reserved post)

    Last edited by mad_hamster; 10-26-2011 at 05:22.
    mad_hamster is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 10-21-2011 , 04:55   Re: Game-coin.com billing
    Reply With Quote #3

    News, to-do list, known bugs

    Version 1.5:
    • Support for reserved slots for paying players
    • (Website-only) Support for referrals: Refer Game-coin to game servers and receive a part of our commission from their profits.


    Version 1.0:
    • Support for Pay-To-Play (mainly trial time)


    Upcoming features:
    • Player-to-player sponsorship; service API will provide info about players sponsoring other players (i.e. taking up their bill); plugins will be able to identify sponsors and grant them bragging rights.
    • Server-side grants: rewarding players with free gameplay time for good deeds.


    Bugs:

    This plugin has been tested under CS:S but should work with other Source games. Let me know of any issues you have. You can raise your logging level (see "configuration" below) and PM me the detailed logs with the time at which the issue occurred.

    Last edited by mad_hamster; 10-26-2011 at 05:26.
    mad_hamster is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 10-21-2011 , 04:55   Re: Game-coin.com billing
    Reply With Quote #4

    Installation
    1. Create an account at http://Game-coin.com
    2. Under “my account” --> “owned servers”, register your game servers. You’ll receive a unique ID for each server.
    3. Install http://sourcemod.net on your servers if you haven’t already.
    4. Install the sockets extension.
    5. Extract the attached zip file (in the first post) into your server(s)’ Sourcemod directory (typically under <game mod>/addons/sourcemod, where <game mod> depends on your game server, e.g. cstrike or tf2).
    6. Edit sourcemod/configs/game-coin/service.cfg, insert your server’s unique ID and password, e.g.:
      Code:
      "Service" {
      	"server_id"         "1234567890"
      	"server_password"   "cantguessthis"
      }
    7. Choose a database: The game-coin plugin logs information about players on your servers, such as the amount of time they played in the past days and how much they’ve been billed. If you operate multiple game servers and would like to impose limits (e.g. trial time granted per day) across all servers instead of each server independently, and/or let your players see gameplay/billing statistics across all your servers from the in-game Game-coin menu, then you need a central database that will be accessed by all your game servers, i.e. MySQL (this is recommended). Otherwise, each server will log data independently in a local sqlite database (no setup needed).

      For MySql: create a new database (e.g. “game_coin”) and assign permissions to a certain username and password. Then, edit sourcemod/configs/game-coin/databases.cfg and add an entry such as:
      Code:
      	"game_coin"
      	{
      		"driver"    "mysql"
      		"host"      "localhost"
      		"database"  "game_coin"
      		"user"      "<user>"
      		"pass"      "<pass>"
      	}
      For Sqlite:
      Code:
      	"game_coin"
      	{
      		"driver"    "sqlite"
      		"database"  "game_coin"
      	}
    8. Edit sourcemod/configs/game-coin/database.cfg, add the database connection name, e.g.:
      Code:
      "Database" {
      	db_name             "game_coin"
      }
    9. The game-coin plugin logs various information into log files under sourcemod/logs/game-coin_<year>-<month>-<day>.log . You can control the verbosity of that information. By default it will only log errors and warnings. You can modify sourcemod/configs/game-coin/logging.cfg and set log_level to include lower-level information such as actual bills being made (level 3). This is useful at first to get to understand how this plugin works.

    Last edited by mad_hamster; 10-26-2011 at 05:50.
    mad_hamster is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 10-21-2011 , 04:56   Re: Game-coin.com billing
    Reply With Quote #5

    Configuration


    The Game-coin plugin is actually more of a billing framework; it’s a set of plugins each doing a specific task, much like the Sourcemod plugins are structured. This plugin incorporates its own plugins sub-system. It can be extended with “billing extension” plugins. The plugins under sourcemod/plugins/game-coin/base are the core services. Don’t touch them. The plugins under sourcemod/plugins/game-coin/exts are billing extensions, and you can add and remove plugins from there without damaging your Game-coin installation.

    Billing extension plugins can increase or decrease the amount certain players are billed, or prevent billing them completely. When they modify the billing rate, they do that as a function of the base billing rate, e.g. +20% or -50%. The base billing rate is defined under sourcemod/configs/billing.cfg, e.g.:

    Code:
    "Billing" {
    	hour_bill_rate_in_euros "0.1"
    }
    …defines a base billing rate of 10 euro-cents per hour (that doesn’t sound like much, but keep in mind that teenagers playing 60+ hours/month end up paying 6 €/month which is probably all they can afford, so don’t be greedy with your pricing).

    Please note! The Game-coin plugin uses one “internal” extension that’s under game-coin/base instead of game-coin/exts, called afk.smx (Away From Keyboard). It monitors players and detects when they’re inactive, and stops billing them. Do not remove, disable, or alter this extension (if you do, do not connect your game servers to Game-coin.com).

    We currently supply the following billing extensions, which are disabled by default and reside under sourcemod/plugins/game-coin/exts/disabled. Just move the ones you want to use from game-coin/exts/disabled to game-coin/exts.

    Depending on how you want to bill your players, choose one of the following:

    Billing method: Trial Time

    Read sourcemod/configs/game-coin/trial.cfg to understand how to configure the trial plugin, edit the default settings, and move plugins/game-coin/exts/disabled/trial.smx to plugins/game-coin/exts/ .


    Billing method: Reserved Slots

    Move plugins/game-coin/exts/disabled/reservedslots.smx to plugins/game-coin/exts/

    Move plugins/reservedslots.smx to plugins/disabled/ (if it's there).

    This plugin is the standard Sourcemod reserved slots plugin, with a slight modification: in addition to checking for the "r" (reserved) admin flag, it also checks if the player is billable. If he is, he can use a reserved slot.

    Read this plugin's configuration instructions here: http://wiki.alliedmods.net/Reserved_Slots

    The configuration parameters are in your sourcemod root configuration file, under cfg/sourcemod/sourcemod.cfg


    Billing method: Restricted entry

    No configuration needed; this is the default. Anyone that's not billable will be kicked from your server. This is good for private/clan servers.


    Billing method: VIP privileges for paying players

    Coming soon!


    In addition, you can use these miscellaneous plugins to alter billing on your server:
    • admin-nobill.smx: Prevents billing administrators on the server. They can play for free (presumably, as a reward for their efforts in moderating the server). See sourcemod/configs/game-coin/admin-nobill.cfg for details.
    • bill-limit.smx: defines the maximum amount that a player can be billed over the last 30 days. When that limit is reached the player isn’t billed any more until his billing total for the past 30 days has lowered below that threshold. This is useful when you have some very dedicated players that spend 5+ hours/day on your servers and they don’t want to end up paying too much money. See sourcemod/configs/game-coin/bill-limit.cfg for details.
    • peak-hours.smx: Defines how much your server bills depending on the hour of the day and day of the week. For example, by default it will prevent billing any player from 3am to 10am (since no one typically plays at those hours, and you probably prefer having a few non-paying players on your server than none at all), and bill +30% during peak hours. See sourcemod/configs/game-coin/peak-hours.cfg for details.

    We will be adding a lot more billing extension plugins in the upcoming months, based on popular requests. Tell us what you need. You’re also very welcome to develop your own (explained below) and share them. Send us a PM and we’ll list your billing extensions here.

    Last edited by mad_hamster; 10-26-2011 at 06:12.
    mad_hamster is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 10-21-2011 , 04:56   Re: Game-coin.com billing
    Reply With Quote #6

    Developing your own billing extensions

    Read the API at sourcemod/scripting/include/game-coin-billing.inc .


    Modifying billing:

    To bill certain players 30% more:

    Code:
    #include <game-coin-billing>
    
    public OnPluginStart() {
    	GC_RegisterBillMod(GC_BillModifyCallback_, "Short description");
    }
    
    // This is called-back every minute by the billing plugin
    public Float:GC_BillModifyCallback_(client) {
    	if (ClientShouldBeBilledExtra(client))
    		return 1.3;  // +30%
    	else return 1.0;
    }

    Stopping billing upon event:

    To prevent billing a player completely, do not use the method above to modify his billing to 0%. Instead, use the explicit GC_StopBillClient() API, e.g.:

    Code:
    #include <game-coin-billing>
    
    public OnSomeEvent(client) {
    	if (!ClientShouldBeBilled(client))
    		GC_StopBillClient(client, GC_BillStopCallback_, GC_BILL_XXX, "Short description");
    }
    
    public OnSomeOtherEvent(client) {
    	if (ClientShouldBeBilled(client))
    		GC_ResumeBillClient(client, GC_BillStopCallback_);
    }
    
    public GC_BillStopCallback_(client, bool:active,
    	time_in_effect, total_time_active, new_time_active, Float:new_bill_prevented)
    {}
    Replace GC_BILL_XXX with the proper enumeration; see the API. It is important to understand that parameter and choose the correct one for your plugin!


    Stopping billing upon player connection:

    If your plugin stops billing clients not based on a certain event but based on some property of the player (e.g. he’s an administrator or VIP), and that property may take a while to obtain (e.g. read from the database), then keep in mind that in the interval between the time the player connected and the time you have the data to decide whether to exempt him from payment (even if it takes a single millisecond), that player will be billed and if he’s unbillable he’ll be kicked immediately.

    Therefore your billing extension should work backwards: it should first immediately prevent billing any player connecting, then once it’s got the data it needs to decide whether the player should be billed or not, either do nothing if he shouldn’t be billed, or RESUME his billing if he should. By calling GC_StopBillClient() with a client of 0, you’re stopping billing for every existing player and every future player that’ll connect. For example:

    Code:
    #include <game-coin-billing>
    
    public OnPluginStart() {
    	GC_StopBillClient(0, GC_BillStopCallback_, GC_BILL_XXX, "Short description");
    }
    
    Public OnClientConnectedAndDataFetched(client) {
    	if (ClientShouldBeBilled(client))
    		GC_ResumeBillClient(client, GC_BillStopCallback_);
    }
    
    public GC_BillStopCallback_(client, bool:active,
    	time_in_effect, total_time_active, new_time_active, Float:new_bill_prevented)
    {}

    Granting privileges to paying players (e.g. VIP plugins):

    Code:
    #include <game-coin-service>
    #include <game-coin-billing>
    
    public GC_OnClientProfileAvailable(client) {
    	// Player is billable
    	if (GC_GetClientBillingStatus(client) == GC_RequestProcessed) {
    		// If we previously stopped billing him, resume his billing
    		if (GC_IsBillStopper(client, GC_BillStopCallback_))
    			GC_ResumeBillClient(client, GC_BillStopCallback_);
    		Grant_VIP_Privileges(client);
    	}
    	// Player is not billable
    	else {
    		// Stop billing him to prevent him getting kicked, unless we already did
    		if (!GC_IsBillStopper(client, GC_BillStopCallback_))
    			GC_StopBillClient(client, GC_BillStopCallback_, GC_BILL_FINITE_STOP_CLIENT, "Short description");
    		Strip_VIP_Privileges(client);
    	}
    }
    
    public GC_BillStopCallback_(client, bool:active,
    	time_in_effect, total_time_active, new_time_active, Float:new_bill_prevented)
    {}
    
    Grant_VIP_Privileges(client) {}
    
    Strip_VIP_Privileges(client) {}

    Logging

    Code:
    #include <game-coin-logging>
    
    MyFunc() {
    	GC_LogDebug(“Kills: %d, name: %s”, 10, “John”);
    	// You can also use other logging levels such as GC_LogInfo()
    }

    More APIs

    See sourcemod/scripting/include/game-coin*.inc . In short:
    • Service plugin: Query whether your server is connected to Game-coin, get events when connected/disconnected.
    • Service plugin: Query a player’s profile (whether he has a Game-coin account, whether he’s billable, cash in wallet, trial time used past day), get events when profile is updated (e.g. the player added money).
    • Service plugin: Add items to the player’s in-game menu.
    • Database plugin: Query whether your server is connected to the database, get events when connected/disconnected.
    • Database plugin: Query/modify player statistics (daily/total time played, been AFK, billed, trial time used), get event when a player’s statistics are fetched from DB and flushed periodically to the DB.
    • AFK plugin: Set how to handle AFK players.


    Compiling

    Under sourcemod/scripting, either run compile_game_coin.bat (windows) or compile_game_coin.sh (linux).


    Plugins structure
    • base/logging.smx is the “lowest” plugin, used by all others to perform logging.
    • base/service.smx maintains a connection to the Game-coin server and provides various APIs, such as billing players. Also provides the player’s in-game menu. This is the “root” plugin.
    • base/database.smx maintains a connection to the database and reads/writes player stats. Some stats are gathered internally, e.g. the amount of time a player has been connected, and the rest are provided by other plugins; The AFK plugin reports how long the player’s been active, the Billing plugin reports how long the player’s been billed and how much, the Trial plugin reports how much trial time was used up, etc. Stats are flushed to the DB once per minute.
    • Base/billing.smx tracks players on the server and bills them once per minute by calling the Service plugin’s APIs. It also provides an API to easily stop or modify the billing rate of individual players.
    • exts/*.smx & base/afk.smx: those plugins are “billing extensions” using the Billing plugin’s APIs.

    Note that you can in theory remove the billing plugin and various billing extensions and perform your own billing directly on top of the Service plugin’s API. But that isn’t recommended; you may make billing mistakes, and your server(s) may get black-listed by Game-coin.

    Last edited by mad_hamster; 10-22-2011 at 22:52.
    mad_hamster is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 10-21-2011 , 04:57   Re: Game-coin.com billing
    Reply With Quote #7

    (reserved post .)

    Last edited by mad_hamster; 10-21-2011 at 06:21.
    mad_hamster is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 10-21-2011 , 04:58   Re: Game-coin.com billing
    Reply With Quote #8

    (reserved post ..)

    Last edited by mad_hamster; 10-21-2011 at 06:21.
    mad_hamster is offline
    mad_hamster
    Member
    Join Date: Nov 2009
    Old 10-21-2011 , 04:58   Re: Game-coin.com billing
    Reply With Quote #9

    (reserved post ...)

    Last edited by mad_hamster; 10-21-2011 at 04:59.
    mad_hamster is offline
    FunkyLoveCow
    Senior Member
    Join Date: May 2010
    Old 10-21-2011 , 11:20   Re: Game-coin.com billing
    Reply With Quote #10

    Does this support something other than euros?

    Looks like a nice plugin. It will be interesting to see how many servers start using it.
    FunkyLoveCow is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 08:38.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode