Forum

> > CS2D > Scripts > disable lua
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch disable lua

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt disable lua

Ghost-Rider
BANNED Off Offline

Zitieren
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>

alt Re: disable lua

mafia_man
User Off Offline

Zitieren
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

alt Re: disable lua

Jynxxx
User Off Offline

Zitieren
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.
1× editiert, zuletzt 04.07.12 12:12:42

alt Re: disable lua

Alistaire
User Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht