Flag A Player
Posted: Mon Nov 22, 2021 11:16 pm
this plugin lets you attach a "flag" to a steam account, and you can:
- warn admins when a player who has been banned before has entered
- execute commands on players when they connect, are putinserver, or every single round (need an example? amx_slay...)
- execute commands normally used by amx_exec (i.e. name "Player")
what are flags?
- a flag attaches certain commands set to execute at a certain time on a steam account; the commands are called "flag commands"
random stuff:
- there are two files created in your configs directory: flagging.ini (which isn't created unless you add a flag in-game) and flagcmds.ini - this stores the stuff you use or whatever
- you can make 150 flags and like 64 commands or something, if you want more change the defines in the plugin
credits:
i used PM's cvar rules plugin for inspiration and ideas, and he also answered some questions i had through pm. thanks PM!
plugin idea: http://forums.alliedmods.net/showthread.php?t=10170
changelog:
in the plugin
cvars:
amx_flagsmenu
- warn admins when a player who has been banned before has entered
- execute commands on players when they connect, are putinserver, or every single round (need an example? amx_slay...)
- execute commands normally used by amx_exec (i.e. name "Player")
what are flags?
- a flag attaches certain commands set to execute at a certain time on a steam account; the commands are called "flag commands"
random stuff:
- there are two files created in your configs directory: flagging.ini (which isn't created unless you add a flag in-game) and flagcmds.ini - this stores the stuff you use or whatever
- you can make 150 flags and like 64 commands or something, if you want more change the defines in the plugin
credits:
i used PM's cvar rules plugin for inspiration and ideas, and he also answered some questions i had through pm. thanks PM!
plugin idea: http://forums.alliedmods.net/showthread.php?t=10170
changelog:
in the plugin
cvars:
commands:amx_flagging - toggles the plugin
amx_autoflagging - toggles whether or not a flag is added for tempbans
(if you ban someone and it's not permanent, they automatically get a flag added with the command "bandefault")
amx_flagsmenu
amx_currentflagsamx_flagsmenu
- brings up the general flag menu (for adding, deleting, or editing a flag)
amx_addflagsmenu [name | steam id | #userid]
- brings up the menu for adding a flag to a player in the server
amx_delflagsmenu
- brings up the menu for deleting a flag
amx_editflagsmenu [name | steam id | #userid]
- brings up the menu for editing a flag's commands
amx_flagsamx_currentflags
say /currentflags
- displays the flags in the server in the console
amx_flagcmdsamx_flags "list" [flag # | player's name | steam id]
amx_flags "?" [flag # | player's name | steam id]
- if the admin does not supply the second argument, it will give a full list of flags. if he does specify, it will list more specific information
amx_flags "add" <name | steam id | user id> [command name]
- if the command name is not supplied, it will flag the player with the command "default," which is created when the plugin starts.
amx_flags "delete" [flag # | player's name | steam id]
amx_flags "del" [flag # | player's name | steam id]
- deletes a flag.
amx_flags "edit" <flag # | name | steam id> <"num" | "number" | "name" | "command"> <change>
amx_flags "change" <flag # | name | steam id> <"num" | "number" | "name" | "command"> <change>
- edits part of a flag:
-> if you use "num" or "number," it will make that flag that number, moving all the others up or down or whatever
-> if you use "name" it will change the name of the player
-> if you use "command" it will change the command of the flag
-> change is obviously the string you want to change to
the basic idea behind this is that you can set "flag commands" for use with the flags. there's a few preset commands and variables for use within the flag commands, and they are the following:amx_flagcmds "list" [cmd number | cmd name]
amx_flagcmds "?" [cmd number | cmd name]
- if the admin does not supply the second argument, it will give a full list of flag commands. if he does specify, it will list more specific information
amx_flagcmds "reg" <command name> <command> [event letter]
amx_flagcmds "register" <command name> <command> [event letter]
- registers a command, and if the event letter is not supplied, then it defaults to "a"; read on to find out how i use events
amx_flagcmds "unreg" <command name>
amx_flagcmds "unregister" <command name>
- deletes/unregisters a command; full name must be supplied.
amx_flagcmds "edit" <cmd # | cmd name> <"num" | "number" | "name" | "command" | "event"> <change>
amx_flagcmds "change" <cmd # | cmd name> <"num" | "number" | "name" | "command" | "event"> <change>
- edits part of a flag command:
-> if you use "num" or "number," it will make that flag command that number, moving all the others up or down or whatever
-> if you use "name" it will change the name of the flag command
-> if you use "command" it will change the command of the flag command
-> if you use "event" it will change the event letter of the flag command
get plugin// Presets are "commands" you put at the beginning of a registered flag command; read on for examples
//
// Presets:
// execute: executes a command on a player (i.e. "name Player")
// chatmsg: prints a chat message to admins
// hudmsg: shows a HUD message to admins
// consolemsg: prints message in the consoles of admins
// playermsg: prints a chat message to the flagged player
// Variables are what you put if you want something replaced in the command before it is executed
//
// Variables:
// [name]: displays the name of the user who was flagged
// [steamid]: displays steam id of the user
// [userid]: displays the user id of the user
// [id]: displays the id of the user
// [flagname]: displays the name of the user at the time of the flag
// [admin]: displays the name of the admin who set the flag
// [flag]: displays the flag number
// [command]: displays the command number