Pointshop ranks + remove problem

Hello,

I need help.

I feel like that person is a VIP access to the pointshop skins, but the problem is that when the person is no longer VIP still has the skin, and can equip.

So I love that, once the guy is more VIP the skin is removed itself from its inventory.

Best Regards

Jesus christs learn to english…
Anyways, you can check for groups whenever someone joins the server, and if they’re not in VIP strip all VIP items from them.
Or, you know, since basically no one ever donates, get his VIP taken away and then still plays on the same server, just do it manually

Sorry I’m French

But it’s not possible to strip automaticaly, if player join ?

Check the usergroup in the OnEquip.

[editline]2nd September 2014[/editline]

You could do it on a PlayerInitialSpawn hook.

I test with headcrab, it’s for admin only

For PlayerInitialSpawn hook. It’s code ? I’m not kick of lua

You’ve used too many comma’s in your last sentence, as well!
Learn to english!

You are so funny, I’m not even gonna be sarcastic.

[editline]2nd September 2014[/editline]

Anyways is an informal way to say anyway; it is still accepted.

I don’t take “knowyourmeme.com” granted for sources.

And for my answer ?

Add this code to your OnEquip.


if ( not ply:GetNWString( "usergroup" ) == "VIP" or not ply:IsAdmin() ) then return false end

Don’t work, look my code


ITEM.Name = 'Headcrab Hat'
ITEM.Price = 100
ITEM.Model = 'models/headcrabclassic.mdl'
ITEM.Attachment = 'eyes'
ITEM.AdminOnly = true

function ITEM:OnEquip(ply, modifications)
	ply:PS_AddClientsideModel(self.ID)
	if ( not ply:GetNWString( "usergroup" ) == "VIP" or not ply:IsAdmin() ) then return false end
end

function ITEM:OnHolster(ply)
	ply:PS_RemoveClientsideModel(self.ID)
end

function ITEM:ModifyClientsideModel(ply, model, pos, ang)
	model:SetModelScale(0.7, 0)
	pos = pos + (ang:Forward() * 2)
	ang:RotateAroundAxis(ang:Right(), 20)
	
	return model, pos, ang
end


EDIT: Wait please, i test with =admin

Why not use


if ( not ply:CheckGroup( "VIP" ) or not plyIsAdmin() ) then return false end

Am I missing the point of GetNWString? (CheckGroup for servers that have donatoradmin/donatormoderator ranks)

You should be using the ITEM:CanPlayerEquip(ply) function
[lua]function ITEM:CanPlayerEquip( ply )

return ply:GetNWString( "usergroup" ) == "VIP" or ply:IsAdmin()

end[/lua]

Okay good, it work, Thanks

I use :


function ITEM:CanPlayerEquip( ply )

	return ply:GetNWString( "usergroup" ) == "VIP" or ply:IsAdmin()
end

But how place a texte personnalized ?

Since this will probably seldom be a problem for you, instead of dealing with all these codes, whenever you take away the persons VIP just go to the Admin menu in pointshop and remove the skins from them. Or maybe I’m just not understanding what you’re talking about…

lol he was trying it with the user group set to user group :slight_smile: silly