Author Topic: Pointshop problem :I  (Read 2702 times)

0 Members and 1 Guest are viewing this topic.

Offline sabo

  • Full Member
  • ***
  • Posts: 136
  • Karma: 2
  • Hello :)
    • The Elite Gaming
Pointshop problem :I
« on: August 18, 2013, 10:27:14 AM »
Hello.

Currently I have a problem with my pointshop doing the following:

If you are a VIP you get -25% on all items.

Example: An item in the shop costs 100,000$

As VIP it is displayed as 75,000$ (because of the discount stated above)

The problem is that VIPs need to own 100,000$ in order to buy the item. The will spend only 75,000$ but yet they will need to have 100,000$ in the wallet.

Example: A VIP has 90,000$ and wants to buy the item which is displayed as 75,000$ and it does not work, he cant buy it at all.
If the VIP has more than the original price (100,000$) then he can buy it for 75,000$.


I hope I could state my problem as clear as possible and I hope you guys can help me.

Here is the discount code:

Code: [Select]
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 'donators' group
if ply:IsUserGroup('vip') then return math.Round(item.Price * 0.75) end


return item.Price
end

Thanks for reading! :-\

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: Pointshop problem :I
« Reply #1 on: August 18, 2013, 12:06:56 PM »
Seems like there is another section of code that checks if said person can afford the current item. Can you paste that part here too?
I cry every time I see that I am not a respected member of this community.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: Pointshop problem :I
« Reply #2 on: August 18, 2013, 01:01:53 PM »
Or at least post whatever pointshop you're using.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.