[Murder Gamemode] [Pointshop]make knife sweps only accessible to the murderer
4 replies, posted
Hi. I have a murder server and I have downloaded knife sweps to sell them on the pointshop of my server. I wanna make them only available to the murderer.
On the (pointshop) lua file, I already added...
function ITEM:CanPlayerEquip(ply)return ply:GetMurderer()
end
... and ...
function GM:PlayerDeath(ply)
ply:StripWeapon(self.WeaponClass)
end
... but when the murderer wins the game, the player keep the knife since they didn't die...
Any solutions ?
Hi.
Thanks for your answer.
I have the swep stripped for 1 sec, before pointshop re-equips it.
Any other solutions ?
This is a really bad simple fix..
hook.Add("PlayerSpawn","strip sweps",function(ply)
timer.Simple( 2, function() ply:StripWeapons() end)
end)
That just adds a two second delay so hopefully it removed it after they're given it back - The better fix would be to go into point shop and alter the code there to only give weapon during the round. That's the hard part of just using a bunch of other peoples addons that are not specifically made for what you want..
Hi. It still doesn't work.
Are there other ways to do it ?
Sorry, you need to Log In to post a reply to this thread.