About Referrals
Adds a referral system to the game. Players can invite other players and receive rewards for this.
Commands
- referal - open interface
- promo [promocode] - activate promo code
Permissions
You can set permission in config, for example:
"Permission (example: referrals.use)": "referrals.use",
Hooks
private void OnPromoCodeActivated(BasePlayer player, string promocode)
API
private string GetPromoCode(BasePlayer member)
private string GetPromoCode(string member)
private string GetPromoCode(ulong member)
Config
{
"Commands": [
"ref",
"referal"
],
"Commands to activate the promo code": [
"promo",
"code"
],
"Permission (example: referrals.use)": "",
"Work with Notify?": true,
"Use auto-wipe?": false,
"Promo Code Chars": "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
"Promo Code Length": 8,
"Awards": [
{
"Invites Amount": 1,
"Type": "Item",
"ID": 1,
"Image": "",
"Title": "",
"Command (%steamid%)": "",
"Plugin": {
"Hook": null,
"Plugin name": null,
"Amount": 0
},
"Display Name (empty - default)": "",
"ShortName": "wood",
"Skin": 0,
"Amount": 20000,
"Chance": 70.0
},
{
"Invites Amount": 2,
"Type": "Item",
"ID": 2,
"Image": "",
"Title": "",
"Command (%steamid%)": "",
"Plugin": {
"Hook": null,
"Plugin name": null,
"Amount": 0
},
"Display Name (empty - default)": "",
"ShortName": "stones",
"Skin": 0,
"Amount": 15000,
"Chance": 70.0
},
{
"Invites Amount": 5,
"Type": "Item",
"ID": 3,
"Image": "",
"Title": "",
"Command (%steamid%)": "",
"Plugin": {
"Hook": null,
"Plugin name": null,
"Amount": 0
},
"Display Name (empty - default)": "",
"ShortName": "leather",
"Skin": 0,
"Amount": 2400,
"Chance": 55.0
},
{
"Invites Amount": 7,
"Type": "Item",
"ID": 4,
"Image": "",
"Title": "",
"Command (%steamid%)": "",
"Plugin": {
"Hook": null,
"Plugin name": null,
"Amount": 0
},
"Display Name (empty - default)": "",
"ShortName": "cloth",
"Skin": 0,
"Amount": 2300,
"Chance": 55.0
},
{
"Invites Amount": 10,
"Type": "Item",
"ID": 5,
"Image": "",
"Title": "",
"Command (%steamid%)": "",
"Plugin": {
"Hook": null,
"Plugin name": null,
"Amount": 0
},
"Display Name (empty - default)": "",
"ShortName": "lowgradefuel",
"Skin": 0,
"Amount": 1500,
"Chance": 50.0
}
]
}
FAQ
