Pointshop Weapons not saving on map change

For some reason NONE of my weapons save on map change. They will spawn every round, but as soon as the map changes or a player disconnects and reconnects, they are as if never bought (green). I have skins and effects that bind to players that work without any problems. But all of my weapons have this issue. I’m guessing this is a pdata issue, but I have no idea how to go about fixing it. I tried running a repair tool on my database but that didn’t change anything, also re-installed pointshop and mysql and all that, but no changes. My server is using pdata. Here is some examples of the items:


ITEM.Name = '357 Magnum'
ITEM.Price = 200
ITEM.Model = 'models/weapons/w_357.mdl'
ITEM.WeaponClass = 'weapon_357'
ITEM.SingleUse = false

function ITEM:OnBuy(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end

function ITEM:OnSell(ply)
ply:StripWeapon(self.WeaponClass)
end

function ITEM:OnHolster(ply)
ply:StripWeapon(self.WeaponClass)
end

function ITEM:OnEquip(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end



ITEM.Name = '357 Magnum'
ITEM.Price = 200
ITEM.Model = 'models/weapons/w_357.mdl'
ITEM.WeaponClass = 'weapon_357'
ITEM.SingleUse = false

function ITEM:OnBuy(ply)
	ply:Give(self.WeaponClass)
	ply:SelectWeapon(self.WeaponClass)
end

function ITEM:OnSell(ply)
	ply:StripWeapon(self.WeaponClass)
end

The first code works every round giving the player the item, but will not save if the player rejoins the server or the map changes. The second code dose not give the item every round, (but says it’s equipped), and also does not save on rejoin or map change.

I don’t see the code where the actual pdata is actually being manipulated, are you leaving something out or am I misunderstanding your question?

My issue is that if a player buys that magnum, it should be there permanently, even if they rejoin the server, but it only lasts while they are on the server. If the map changes or they rejoin they lose the gun and have to buy it again. This should not be happening and I’m not sure why it is. My question is, why could this be happening? Is it the item code? Is it pdata issue? Where do I look to find out?

Another issue I have is, while hats do save and work, they don’t display in the pointshop preview window like they used to. Is this tied to pdata? Something must be corrupted or something…

If I deleted the weapons and hats tables from my pdata would that possibly fix this?

Either reinstall pointshop or remake them yourself.