Forum

> > CS2D > Scripts > disable lua
Forums overviewCS2D overview Scripts overviewLog in to reply

English disable lua

5 replies
To the start Previous 1 Next To the start

old disable lua

Ghost-Rider
BANNED Off Offline

Quote
hi can i disable one specific lua when server is online?
example bad words..
when i connect server i wanna disable badwords.lua
because i see the chat and i can kick or moderate the users manually... and when i go out from my server i enable lua. so the server automatically moderate the users.
usage:
1
2
!disable <lua name>
!enable <lua name>

old Re: disable lua

mafia_man
User Off Offline

Quote
No it's not possible

You need to write special script which will can be disabled/enable.

It's also possible to freehook from say

old Re: disable lua

Jynxxx
User Off Offline

Quote
I'm guessing it would go something like this
1
2
3
4
5
6
addhook("say","disable")
function disable(id,txt)
	if txt == "!disable" then
		freehook("hookname","functionname")
	end
end

Just an example.
edited 1×, last 04.07.12 12:12:42 pm

old Re: disable lua

Alistaire
User Off Offline

Quote
Or you could make a script like;

1
2
3
if AA_enabled then
	-- loads of code
end

And one masterscript with a sayfunction. Then just dofile(script) everywhere on the masterscript. It would work best.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview