Login to ZARP





View BBCode Back »

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.

BBCode


Time to create page: 0.081 seconds

221 PLAYERS ONLINE

Connect to server View Gametracker DarkRP
18/127
Online
Connect to server View Gametracker Deathrun
0/40
Online
Connect to server View Gametracker TTT
0/47
Online
Connect to server View Gametracker Bhop
0/32
Online
Connect to server View Gametracker Surf
4/32
Online
Connect to server View Gametracker Prop Hunt
0/42
Online
Connect to server View Gametracker Sandbox
0/42
Online
Connect to server Discord
199/985
Online
Top