• Different Pointshop Income for Different Donators
    2 replies, posted
I has this idea but not sure how to do it maybe yo guys can teach me which file I need to edit. Ok here's my question, I have different donator statuses Bronze, Silver, Gold, etc... I want to make it so like if you are a Bronze donator you get 15 percent more income then regular users. How would I set it in my pointshop file to do it for different donators if you know what i'm saying. Example of what Im trying to do is here: [url]http://astonishinggroup.moonfruit.com/#/donations/4577476935[/url] If you can help it would greatly appreciated. Also if I need more info to give you I can.
[QUOTE=Astonishing;41141847]I has this idea but not sure how to do it maybe yo guys can teach me which file I need to edit. Ok here's my question, I have different donator statuses Bronze, Silver, Gold, etc... I want to make it so like if you are a Bronze donator you get 15 percent more income then regular users. How would I set it in my pointshop file to do it for different donators if you know what i'm saying. Example of what Im trying to do is here: [url]http://astonishinggroup.moonfruit.com/#/donations/4577476935[/url] If you can help it would greatly appreciated. Also if I need more info to give you I can.[/QUOTE] Okay, in your [B]sh_config.lua[/B], [U]line 28[/U], you have a function that is used to calculate prices, and the ability to change the % of a "sale" for each class. This file is located in your [B][U]addons/pointshop-master/lua folder.[/U][/B] [code]PS.Config.CalculateBuyPrice = function(ply, item) -- You can do different calculations here to return how much an item should cost to buy. -- There are a few examples below, uncomment them to use them. -- Everything half price for admins: -- if ply:IsAdmin() then return math.Round(item.Price * 0.5) end -- 25% off for the 'bronze' group if ply:IsUserGroup('bronze') then return math.Round(item.Price * 0.75) end -- 35% off for the 'silver' group if ply:IsUserGroup('silver') then return math.Round(item.Price * 0.65) end -- 50% off for the 'gold' group if ply:IsUserGroup('gold') then return math.Round(item.Price * 0.50) end return item.Price end[/code] Something like that should work. Hope I helped! If you need anymore help, feel free to comment back or add me on my Steam.
Dude! Your a genius, thanks for the help. I'll add you on steam :D
Sorry, you need to Log In to post a reply to this thread.