Fennster4 wrote:
What happens when you aren't suppose to have a weapon in a certain gamemode for minigames, and you just type !knife which gives you the ability to kill people when you shouldn't be able, or when you aren't suppose to have a melee weapon but a gun only?
It would be cool to add but too many variables that we'd have to think of.
You don't allow it to work if the game is not the one it is intended for
function CheckKnife()
if engine.ActiveGamemode() == "GAMEMODENAME" then
return true
else
return false
end
end
usage:
hook.Add("PlayerSpawn", "GiveKnife", function()
if CheckKnife() then
ply:Give("weapon_knife")
end
end)
or many other ways you can do it.