Forum

> > CS2D > Scripts > Lockteams For HC Admin Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lockteams For HC Admin Script

6 replies
To the start Previous 1 Next To the start

old Re: Lockteams For HC Admin Script

GeoB99
Moderator Off Offline

Quote
@user Talented Doge: He means how to make a lock team snippet of code compatible with modules of HC Admin Script. The process isn't that hard but it takes some time to do it.

First off, all moderation commands belong in the moderation.lua. There you can modify (however it's better to not modifty the core part of it!) or adding new commands in your choice. With that said, if we want lock team commands to become as say commands then open that file and search for a function named hc.moderation.init(). In that function, we'll have to paste some several lines that I've wrote below (before end, be careful!).

1
2
3
4
5
6
hc.add_say_command("lock_t", hc.moderation.lockt_say_command, hc.MODERATOR1, "Locking Terrorists team.")
hc.add_say_command("lock_ct", hc.moderation.lockct_say_command, hc.MOERATOR1, "Locking Counter-Terrorists team.")
hc.add_say_command("lock_all", hc.moderation.lockall_say_command, hc.MOERATOR1, "Locking the whole teams.")
hc.add_say_command("unlock_t", hc.moderation.unlockt_say_command, hc.MODERATOR1, "Unlocking Terrorists team")
hc.add_say_command("unlock_ct", hc.moderation.unlockct_say_command, hc.MODERATOR1, "Unlocking Counter-Terrorists team.")
hc.add_say_command("unlock_all", hc.moderation.unlockall_say_command, hc.MODERATOR1, "Unlocking the whole teams.")

Note that it's allowable from Moderators of 1 grade to above only. You can change that anyway (the hc.MODERATOR1 part) if you don't like moderators of the first grade using it. After that, scroll down until you find the "Say commands" section. This section is used for say commands only. When you found it, paste that snippet of code below.
More >

I've took this code somewhere from a thread and tweaked it a bit to make sure it is compatible. Save all the changes and you're done.

Haven't tested it though but I guess it will do the job somehow.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview