The restrictions need to be added in the file configs/CommandRestrictions.ini.
The first thing you need to do is write the command name in square brackets. You can add multiple commands on the same line separated by commas. The same restrictions will apply to all of them.
On the next lines you can add the restrictions - one per line, following the syntax: <status> <type> "[value]" "[message]".
The third argument (value) doesn't need to be added when "type" is set to "all".
The fourth argument (message) is optional.
Here's a list of all possible arguments according to their type:
status - sets whether the restriction will allow or block the command usage
allow - allow usage
block - blocks usage
type - sets who the restriction is meant for
all - targets all players (doesn't require the [value] argument)
name - targets players based on their name (case-insensitive)
ip - targets players based on their IP address
steam - targets players based on their SteamID
flags - targets players based on their admin flags (the player must have ALL of the specified flags)
anyflag - targets players based on their admin flags (the player needs to have AT LEAST ONE of the specified flags)
life - targets players based on whether they are dead or alive
team - targets players based on their team (only available in Counter-Strike)
rank - targets players based on their rank in CSStats (only available in Counter-Strike)
kills - targets players based on their number of kills in CSStats (only available in Counter-Strike)
deaths - targets players based on their number of deaths in CSStats (only available in Counter-Strike)
headshots - targets players based on their number of headshots in CSStats (only available in Counter-Strike)
score - targets players based on their score in the players list (TAB)
map - targets server maps (e.g. "de_dust2") or map types (e.g. "de_*") -- case-insensitive
time - targets specific hours of the day (e.g. "10:45 - 23:00")
xp - targets players based on their current amount of XP (requires OciXCrom's Rank System)
value - this is where you enter the needed information according to "type"
Example: if "type" is "name", you need to write the name of the player (case insensitive)
Example: if "type" is "team", you need to type in the team name - the allowed values can be found in the description above (in the brackets) - ct, t, spec, unassigned - have in mind that terrorist, spectator and other names are valid too, as long the first letter remains unchanged.
message - here you can set the message that will be sent to the player when the command is executed
If not set or is blank, the default message will be sent.
$cmd$ will be replaced with the command itself.
If set to #none, no message will be shown.
Restriction examples
Example #1 - blocks the "amx_slap" command for all players
[amx_slap]
block all
Example #2 - blocks the "/kick" chat command for all players except for those who have the flag "c"
[say /kick]
block all
allow flag "c"
Example #3 - blocks the "amx_quit" command for all dead players + spectators
[amx_quit]
block life "dead"
block team "spectators"
Example #4 - allows the "amx_boss" command only for a player with the given SteamID
[amx_boss]
block all
allow steam "STEAM_0:0:123456789"
Example #5 - disables the radio commands and sending a custom message when someone tries to use them
[radio1, radio2, radio3]
block all "" "The command &x04$cmd$ &x01is currently &x07disabled&x01."
Example #6 - allowing usage of "votemap" commands only during the night
[amx_votemap, amx_votemapmenu]
block all "" "You can vote for a map only during the night."
На данном сайте используются файлы cookie, чтобы персонализировать контент и сохранить Ваш вход в систему, если Вы зарегистрируетесь.
Продолжая использовать этот сайт, Вы соглашаетесь на использование наших файлов cookie.