Buy vip only jihad sounds in pointshop.

I understand the basic concept of how i would get it to work, however i know little to no lua.
Essentially, i would like people with the ulx rank of “vip” or “supervip” to be able to buying something in pointshop called “insertcustomjihadnamehere” and have it play “jihadsoundnamehere.mp3” when it is equipped. And have jihad play lalalalalalalala (Default sound for jihad) when it is on holster.

I’m happy to work something out with anyone who feels like they could possibly do this. :slight_smile:

EDIT:


	if (SERVER) then
		timer.Simple(2, function() self:Asplode() end )
		self.Owner:EmitSound( "siege/jihad.wav" )
	end

end

That’s what the code looks like for the sound part.

(I know nothing about coding, but maybe it would look something like this? I have no idea.)


	if (SERVER)
                      if customCheck = function(ply) return CLIENT or ply:IsUserGroup("vip")
                            then
		timer.Simple(2, function() self:Asplode() end )
		self.Owner:EmitSound( "siege/customsoundhere.wav" )
        elseif
                timer.Simple(2, function() self:Asplode() end )
		self.Owner:EmitSound( "siege/defaultjihadsound.wav" )
	end

end

Please don’t be offended by how horrid that is xD Hopefully you can stoop down to my moron coding level and maybe understand what i’m getting at. Open of getting that working, i’d have to make it purchasable in the point shop. (Or not put it in the pointshop, and just have them in some way pick from different jihad sounds.)

Just hire a coder.

Copying code from a DarkRP job and putting it in your Jihad isn’t the right way to go about getting things done.

I figured, but like i said, i have no clue.

You may just learn coding, nobody will help you from scratch, they will help you if you have errors, or if you have something to ask about lua coding. I can help you with that vip group thing though. You need to open items/whatevertabyouhaveinpointshop/nameofthejihadthing.lua and add this to the end of ITEM.Somethinghere’s


ITEM.AllowedUserGroups = { "vip" }

or if you have different named group of the Vip rank then replace “vip” with “whatever you have as the rank name”