stock cmd_target(id, const arg[], flags = CMDTARGET_OBEY_IMMUNITY)
id | Client index of admin performing an action |
arg | Target pattern |
flags | Filtering flags, see CMDTARGET_* constants above |
Processes a generic target pattern and tries to match it to a client based on filtering flags. If no unique target is found an appropriate message is displayed to the admin.
The pattern is first matched case insensitively against client names. If no match is found it is matched against client authids. If still no match is found and the pattern starts with '#' it is finally matched against client userids.
Since client names are matched by substring the pattern can potentially match multiple targets. In that case the function will return 0 and ask the admin to provide a unique pattern.
The filtering flags are applied after the pattern matching has finished. That means the pattern has to be unique against all clients on the server even if some of them are not eligible.
Client index, or 0 if no or multiple clients matched
This documentation was generated automatically using pawn-docgen written by xPaw for AlliedMods.