Pointshop help

I am trying to make it where when you buy this point shop addon it changes your material, I got it to do that but Im not sure how to make it revert back. :l Im looking for the code on holster to revert to normal material. this is what I have, I am a far noob realize that pl0x :smiley:


ITEM.Name = 'Test Material'
ITEM.Price = 999000
ITEM.Model = 'models/harry/harry_potter.mdl'

function ITEM:OnEquip(ply, modifications)
	ply:SetMaterial("Models/effects/splodearc_sheet")
end

function ITEM:OnHolster(ply)
	if ply._OldModel then
		ply:SetModel(ply._OldModel)
	end
end


Untested.


ITEM.Name = 'Test Material'
ITEM.Price = 999000
ITEM.Model = 'models/harry/harry_potter.mdl'


function ITEM:OnEquip(ply, modifications)
	ply:SetMaterial("Models/effects/splodearc_sheet")
        OrgMaterial = ply:GetMaterial()
end

function ITEM:OnHolster(ply)
	ply:SetMaterial(OrgMaterial)
end



ITEM.Name = 'Test Material'
ITEM.Price = 999000
ITEM.Model = 'models/harry/harry_potter.mdl'

function ITEM:OnEquip(ply, modifications)
	ply:SetMaterial("Models/effects/splodearc_sheet")
end

function ITEM:OnHolster(ply)
	ply:SetMaterial("")
end

There ya go.

Setting it to no material will cause an error iirc.

It actually resets the material in my experience. Never got an error.

EDIT: