Pointshop Change player models colour

Hello everyone of the facepunch forums,

i wanted to ask you how would i setup a way on pointshop so i could make it so you could change the colour of a players skin. by this i don’t mean paint it but with the tron skin you get other vtf file that are diffrent colours for the tron skin here is all the code from his skins.


	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_emss.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_emsspwr.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_emss_green.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_emss_orange.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_emss_purple.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_emss_white.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_emss_yellow.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_exp.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_green.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_norm.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_occ.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_orange.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_pulsar.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_purple.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_white.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_baton_yellow.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_emss.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_emsspwr.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_emss_green.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_emss_orange.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_emss_purple.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_emss_white.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_emss_yellow.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_exp.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_green.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_norm.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_occ.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_orange.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_pulsar.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_purple.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_white.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_body_yellow.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_emss.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_emsspwr.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_emss_green.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_emss_orange.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_emss_purple.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_emss_white.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_emss_yellow.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_exp.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_green.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_norm.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_occ.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_orange.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_pulsar.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_purple.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_white.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_disc_yellow.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_emss.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_emsspwr.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_emss_green.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_emss_orange.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_emss_purple.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_emss_white.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_emss_yellow.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_exp.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_green.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_norm.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_occ.vtf" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_orange.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_pulsar.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_purple.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_white.vmt" )
	resource.AddFile( "materials/models/mrgiggles/sassmodels/tronplayer/tron_helmet_yellow.vmt" )

as you can see their is his usal model and then his model but with diffrent colour lights and i wanted to know how i could make it so when you buy him on pointshop you can change the colour of his lights?


ITEM.Name = 'Tron'
ITEM.Price = 1050000
ITEM.Model = 'models/mrgiggles/sassmodels/tronplayer-fix.mdl'

function ITEM:OnEquip(ply, modifications)
	if not ply._OldModel then
		ply._OldModel = ply:GetModel()
	end
	
	timer.Simple(1, function() ply:SetModel(self.Model) end)
end

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

function ITEM:PlayerSetModel(ply)
	ply:SetModel(self.Model)
end


that is the pointshop code for him to be added to it. any help will be highly apprciated.
not only will this help my server but it will also help people who don’t know how to do this on pointshop :slight_smile:

Thanks for any help give and i don’t know if this is possible,
if you would’t mind giving me the script done i would love you if not thanks for the code :slight_smile:

Where is the code for changing the color?

there is none, what the shit does “you can change the colour of his lights” mean.

Have you checked if the model has different “skins”?

Here are the skins (0, 1, 2, 3, 4, 5). Skin 6 cycles through colors. Use entity:SetSkin wherever you see fit.

http://xaviergmail.ml/i/1387538431132.png

http://xaviergmail.ml/i/1387538488787.png

http://xaviergmail.ml/i/1387538519434.png

http://xaviergmail.ml/i/1387538535485.png

http://xaviergmail.ml/i/1387538552578.png

http://xaviergmail.ml/i/1387538567698.png

What I think he means is that he wants something like the trails “Modify” option to change color range, sadly I do not believe there an easy way to do it, I have seen things like this on LifePunch, but that may just be for hats. So good luck with trying to get it to work :slight_smile:
P.S. Maybe send me how to do it if you can find it :3

If you want a color picker, you could always set the skin to 2 (white) and use SetColor for a quick cheap hack

-snip- I guess not

this is what i want but then when you buy it in pointshop you can change to the other skins because when you buy it you can only have light blue and i wounded if their was a code to do this.

add it as an item modification, there’s plenty of documentation on pointshop to let you do this.

just remember this isn’t a requests forum, we won’t spoon feed you the complete solution.

I haven’t looked at how PointShop works but from what I can tell it looks like you could
prompt the user to choose their color in the ITEM:OnEquip function

ow ok thx i’l have a look in to it :slight_smile:

[editline]20th December 2013[/editline]

thanks man. yer i’d rather not be spoon fed XD i’m trying to make a surf server and i mainly alot better at html and php so thats why i wanted a bit of help finding the ssolution but thanks btw love you pointshop trading script :smiley: