BookHorseSoftware / SteamGroupRewardsFramework

A super-simple framework for granting users rewards for joining your Steam group.
GNU General Public License v3.0
13 stars 5 forks source link

How to give points to players? #14

Closed dfsss1 closed 4 years ago

dfsss1 commented 4 years ago

I want the reward '' give 20.000 points '' for joining my steam group… how can i add that reward? sorry i don't understand too much :(

BytewaveMLP commented 4 years ago

http://pointshop2.kamshak.com/en/latest/api/index.html#PLAYER:PS2_AddStandardPoints

Pointshop 2 adds player methods for awarding standard and premium points. Just create an award and grant the player however many points of whichever type you like in the callback. You should mark the award as OneTime in order to prevent players from leaving and rejoining the Steam group for infinite points.

Example:

SGRF.Rewards.PointshopPoints = {
    OneTime   = true,
    Recurring = false,
    Callback  = function(ply)
        ply:PS2_AddStandardPoints(20000)
    end,
}
dfsss1 commented 4 years ago

http://pointshop2.kamshak.com/en/latest/api/index.html#PLAYER:PS2_AddStandardPoints Pointshop 2 adds player methods for awarding standard and premium points. Just create an award and grant the player however many points of whichever type you like in the callback. You should mark the award as OneTime in order to prevent players from leaving and rejoining the Steam group for infinite points. Example: SGRF.Rewards.PointshopPoints = { OneTime = true, Recurring = false, Callback = function(ply) ply:PS2_AddStandardPoints(20000) end, }

the addon detects the people who join to the steam group but they don't receive the points :( i be doing something wrong? i copy and paste the code you bring me

BytewaveMLP commented 4 years ago

Do you receive any Lua errors when starting your server and/or when a player joins the Steam group? Remember to watch the server console; your client won't show anything.

Also, where exactly did you put this code? At the bottom of addons/steamgrouprewardsframework/lua/sgrf/config.lua?

dfsss1 commented 4 years ago

Do you receive any Lua errors when starting your server and/or when a player joins the Steam group? Remember to watch the server console; your client won't show anything. Also, where exactly did you put this code? At the bottom of addons/steamgrouprewardsframework/lua/sgrf/config.lua?

i fix the problem brother, very thanks!!!