I need help making pointshop use the DarkRP Wallet as "points" as opposed to actual points.

TL;DR I want it so that when someone buys something in PointShop, they pay with DarkRP Money, not points.

I know its possible. I’ve seen it on servers, and the fact that PointShop can be made to give points on kills in TTT, or points on round over on DeathRun just proves my point more.

Can someone help? I tried replacing /pointshop/lua/providers/data.lua:22 to points = DarkRPVars.money or 0, but it has no effect.

I was going to ask this in the DarkRP Help Thread, but then I read the post FPtje made:

I have no clue how I can do this given I absolutely hate using net entities. I mean, they don’t appear to be defined ANYWHERE. Can I please get some help?

I might know a concept to do this, where before buying it checks how much money you have then takes away the amount of money needed to purchase something while still using points and just making everything cost 0 points.

As for awarding points, it’s way different as it just gives PointShop Points instead of replacing them

Yeah, I just want it to replace points with the wallet.

Here’s my stab at it. I have no idea if this will work.

Every tick it checks for differences and then evens them out. Is what it’s supposed to do.



hook.Add("Think", "Points2Cash&Back", function()
for k, v in pairs(player.GetAll()) do
local points = v:PS_GetPoints()
local cash = v.DarkRPVars.money

if v.oldpoints and v.oldcash then

if points > v.oldpoints or points < v.oldpoints then
cash = points
elseif cash > v.oldcash or cash < v.oldcash then
v:PS_SetPoints(cash)
end

if not v.oldpoints and v.oldcash then
if cash > points then
v:PS_SetPoints(cash)
else
cash = points
end
end

end

v.oldpoints = points
v.oldcash = cash

end
end)


Probably won’t work, but maybe it’ll give you some ideas.

Heh, the biggest issue is that pointshop is a mess. And no one wants to really work with it. Kinda like TTT, only its a good gamemode so people perciveer

This almost works, when i go on to the game, it shows my cash when i start but when i go on the menu it does not work, can you see what the problem is?

[editline]8th April 2015[/editline]

Also does anyone have the TTT version of this , so i can have a look at it so i can have a rough idea of what the problem is

nice necro. GG

I don’t know about actually making the money system and the pointshop use the exact same currency(It’d be almost impossible to switch out something two completely different systems in-game use), but your best bet is probably to try and make so that your amount of pointshop points matches the amount of money you have, and when you buy something in the pointshop you lose money in your wallet too, and vice versa.