With such little information I don't expect any exact examples but is there a way to disable normal concommands during events like
[CODE]local event = false
function SWEP:PrimaryFire()
event = true
timer.Simple( 5, function() event = false end )
end
function SWEP:Think()
if event == true then
con.Command:Disable( "kill" ) --Probably wouldn't work, I just made this up for example
end
if self.Owner:runConCommand( "kill" ) then --Again, made up garbage
print( "YOU CAN'T DIE!!" )
end
end
[/CODE]
I'm not sure if there is a function like that, that can disable a console command temporarily. Thanks.
You can't block normal concommands, but you can block kill concommand with [url]http://wiki.garrysmod.com/page/GM/CanPlayerSuicide[/url]
[QUOTE=Robotboy655;45001507]You can't block normal concommands, but you can block kill concommand with [url]http://wiki.garrysmod.com/page/GM/CanPlayerSuicide[/url][/QUOTE]
Oh jeez thanks! Is there a function is called when the player runs a certain command?
No.
[QUOTE=Robotboy655;45001521]No.[/QUOTE]
Okay thank you very much :p
Sorry, you need to Log In to post a reply to this thread.