blah
This commit is contained in:
parent
d40cf7f51a
commit
7160566a94
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,4 +1,10 @@
|
||||||
|
amxmodx/data
|
||||||
|
amxmodx/logs
|
||||||
amxmodx/plugins
|
amxmodx/plugins
|
||||||
|
amxmodx/scripting/amxmod_compat
|
||||||
|
amxmodx/scripting/backup
|
||||||
|
amxmodx/scripting/compiled
|
||||||
|
amxmodx/scripting/testsuite
|
||||||
amxmodx/scripting/*.amxx
|
amxmodx/scripting/*.amxx
|
||||||
amxmodx/scripting/compiled/*.amxx
|
amxmodx/scripting/compiled/*.amxx
|
||||||
amxmodx/configs/sql.cfg
|
amxmodx/configs/sql.cfg
|
||||||
|
|
165
amxmodx/ACKNOWLEDGEMENTS.txt
Normal file
165
amxmodx/ACKNOWLEDGEMENTS.txt
Normal file
|
@ -0,0 +1,165 @@
|
||||||
|
----------------------------------
|
||||||
|
Pawn Abstract Machine and Compiler
|
||||||
|
----------------------------------
|
||||||
|
Copyright (c) ITB CompuPhase, 1997-2005
|
||||||
|
|
||||||
|
This software is provided "as-is", without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from
|
||||||
|
the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software in
|
||||||
|
a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
zlib, as used in the AMX Mod X Pawn compiler and plugin loader
|
||||||
|
--------------------------------------------------------------
|
||||||
|
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
|
Jean-loup Gailly Mark Adler
|
||||||
|
jloup@gzip.org madler@alumni.caltech.edu
|
||||||
|
|
||||||
|
---------------------------------
|
||||||
|
PCRE, as used in the Regex module
|
||||||
|
---------------------------------
|
||||||
|
Copyright (c) 1997-2014 University of Cambridge
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the University of Cambridge nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
You may obtain a copy of the license at
|
||||||
|
http://www.pcre.org/licence.txt
|
||||||
|
|
||||||
|
-----------------------------------------
|
||||||
|
libmaxminddb, as used in the GeoIP module
|
||||||
|
-----------------------------------------
|
||||||
|
Copyright 2013-2014 MaxMind, Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
Portable C++ Hashing Library, as used in AMX Mod X Core module
|
||||||
|
--------------------------------------------------------------
|
||||||
|
Copyright (c) 2014 Stephan Brumme
|
||||||
|
|
||||||
|
All source code published on http://create.stephan-brumme.com
|
||||||
|
and its sub-pages is licensed similar to the zlib license:
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the author be held liable for any damages arising from
|
||||||
|
the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
* The origin of this software must not be misrepresented; you must
|
||||||
|
not claim that you wrote the original software.
|
||||||
|
* If you use this software in a product, an acknowledgment in the product
|
||||||
|
documentation would be appreciated but is not required.
|
||||||
|
* Altered source versions must be plainly marked as such, and
|
||||||
|
must not be misrepresented as being the original software.
|
||||||
|
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
Portable C UTF-8 Rewind Library, as used in AMX Mod X Core module
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
Copyright (C) 2014-2016 Quinten Lansu
|
||||||
|
|
||||||
|
Licensed under The MIT License.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
Parson, as used in the JSON module
|
||||||
|
--------------------------------------------------------------
|
||||||
|
Copyright (c) 2012 - 2017 Krzysztof Gabis
|
||||||
|
|
||||||
|
Licensed under The MIT License.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
339
amxmodx/GPLv2.txt
Normal file
339
amxmodx/GPLv2.txt
Normal file
|
@ -0,0 +1,339 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
674
amxmodx/GPLv3.txt
Normal file
674
amxmodx/GPLv3.txt
Normal file
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
34
amxmodx/LICENSE.txt
Normal file
34
amxmodx/LICENSE.txt
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
AMX MOD X LICENSE INFORMATION
|
||||||
|
VERSION: AUGUST-04-2014
|
||||||
|
|
||||||
|
AMX Mod X is licensed under the GNU General Public License, version 3, or (at
|
||||||
|
your option) any later version.
|
||||||
|
|
||||||
|
As a special exception, the AMX Mod X Development Team gives permission to link
|
||||||
|
the code of this program with the Half-Life Game Engine ("HL Engine") and
|
||||||
|
Modified Game Libraries ("MODs") developed via the Half-Life 1 SDK as full
|
||||||
|
replacements for Valve games. You must obey the GNU General Public License in
|
||||||
|
all respects for all other code used other than the HL Engine and MODs. This
|
||||||
|
extension, at your option, may also be granted to works based on AMX Mod X.
|
||||||
|
|
||||||
|
As an additional special exception to the GNU General Public License 3.0,
|
||||||
|
AlliedModders LLC permits dual-licensing of DERIVATIVE WORKS ONLY (that is,
|
||||||
|
Pawn/AMX Mod X Plugins and AMX Mod X Modules, or any software built from the AMX
|
||||||
|
Mod X header files) under the GNU General Public License version 2 "or any
|
||||||
|
higher version." As such, you may choose for your derivative work(s) to be
|
||||||
|
compatible with the GNU General Public License version 2 as long as it is also
|
||||||
|
compatible with the GNU General Public License version 3, via the "or any higher
|
||||||
|
version" clause. This is intended for compatibility with other software.
|
||||||
|
|
||||||
|
As a final exception to the above, any derivative works created prior to this
|
||||||
|
date (August 4, 2014) may be exclusively licensed under the GNU General Public
|
||||||
|
License version 2 (without an "or any higher version" clause) if and only if the
|
||||||
|
work was already GNU General Public License 2.0 exclusive. This clause is
|
||||||
|
provided for backwards compatibility only.
|
||||||
|
|
||||||
|
A copy of the GNU General Public License 2.0 is available in GPLv2.txt.
|
||||||
|
A copy of the GNU General Public License 3.0 is available in GPLv3.txt.
|
||||||
|
|
||||||
|
Some components of AMX Mod X use a license other than the GNU General Public
|
||||||
|
License. You must also adhere to these additional licenses in all respects. See
|
||||||
|
ACKNOWLEDGEMENTS.txt for further details.
|
322
amxmodx/configs/allmaps.txt
Normal file
322
amxmodx/configs/allmaps.txt
Normal file
|
@ -0,0 +1,322 @@
|
||||||
|
ins_blueline
|
||||||
|
mad_tomb2
|
||||||
|
ladder_0logic
|
||||||
|
dyd_hb_betty_k
|
||||||
|
bkz_junglebhop
|
||||||
|
kzlt_arabhop
|
||||||
|
kz_indusrun
|
||||||
|
kzex_earthruins
|
||||||
|
jail_logo
|
||||||
|
kzeed_bhop_madness
|
||||||
|
kz_heat
|
||||||
|
kzsca_watertemple
|
||||||
|
kek_google
|
||||||
|
kzro_island
|
||||||
|
bkz_bhopaztec
|
||||||
|
imkz_tsfh
|
||||||
|
kzru_Mam6ahop
|
||||||
|
bhop_dustzone
|
||||||
|
kzro_bhopbl0ck
|
||||||
|
bhkz_bronzebhop
|
||||||
|
dyd_toonblock
|
||||||
|
bkz_goldbhop
|
||||||
|
kz-endo_bikinihop
|
||||||
|
ksz_zuma
|
||||||
|
bk_icerock
|
||||||
|
fu_bawhop
|
||||||
|
mto_bhops
|
||||||
|
d2_mario_bhop
|
||||||
|
dyd_bhop
|
||||||
|
bkz_dqvolski_most
|
||||||
|
cypress_p0burkan
|
||||||
|
kzua_zp_hamunaptra_x
|
||||||
|
bkzgt_aasault
|
||||||
|
smk_factory
|
||||||
|
bk_bhop
|
||||||
|
doze_ljrun
|
||||||
|
kz_6fd_volcano
|
||||||
|
kz_ins_ancientgardens
|
||||||
|
clintmo_bhoptoon
|
||||||
|
mls_greenstyle_bh
|
||||||
|
kz_kzse_dustbhop_h
|
||||||
|
etl_spacebhop
|
||||||
|
kzpf_deathless_x
|
||||||
|
kz_kzro_roscbhop
|
||||||
|
bhop_aeonflux
|
||||||
|
bkz_goldbhop_v2
|
||||||
|
risk_sector
|
||||||
|
py_mix
|
||||||
|
kz_tkz_desertbl00ks
|
||||||
|
risk_bhop_bunny
|
||||||
|
slD_bside_nightblock
|
||||||
|
kg_duckhops_flawless
|
||||||
|
kz_deathvalley
|
||||||
|
kz_xj_communitybhop
|
||||||
|
BBbhop
|
||||||
|
kz_j2s_icevalley
|
||||||
|
cah_lost
|
||||||
|
kz_nix
|
||||||
|
bhop_blocks
|
||||||
|
kz_cg_xtremedesert
|
||||||
|
kz_kzro_winter
|
||||||
|
kzru_spacehop
|
||||||
|
pprn_violetta_x
|
||||||
|
cg_wildwesthop
|
||||||
|
gbc_towers2
|
||||||
|
kzsca_burrow
|
||||||
|
cg_cbblebhop
|
||||||
|
kzro_jaashsbhop
|
||||||
|
kz_man_bhopsnow
|
||||||
|
gayl0rd_bhop
|
||||||
|
cypress_volcancliff
|
||||||
|
etl_forsakenblock
|
||||||
|
kz_man_neighbourhood
|
||||||
|
coma_X
|
||||||
|
kzro_mountainbhop
|
||||||
|
kaspek_caverna_v1
|
||||||
|
daza_colorswitch
|
||||||
|
ham_bricks
|
||||||
|
kz_kzsca_bhopindustry
|
||||||
|
kz_j2s_cupblock
|
||||||
|
fu_replayhop
|
||||||
|
kz_j2s_westbl0ck
|
||||||
|
kz_longjumps2
|
||||||
|
pixelhop
|
||||||
|
bhop_fabrit
|
||||||
|
kzua_de_portal
|
||||||
|
firs_room_x
|
||||||
|
hb_lambdaaa
|
||||||
|
bhop_its_2caves
|
||||||
|
j2s_autumn
|
||||||
|
bhop_platinum
|
||||||
|
kzla_cdbanana
|
||||||
|
kzua_mk_illumina_h
|
||||||
|
hfr_302
|
||||||
|
ftw_deathzone
|
||||||
|
kzls_kodash
|
||||||
|
bkz_noob
|
||||||
|
kzsca_bagdad
|
||||||
|
bhop_tropic_h
|
||||||
|
j2s_sandland
|
||||||
|
1324_svalley
|
||||||
|
bkz_forestrace
|
||||||
|
kzsca_watertemple2
|
||||||
|
rkz_easy_bhop_cross_runner
|
||||||
|
kzls_smile
|
||||||
|
hb_patchouli
|
||||||
|
kz_nobkz_factoryrun
|
||||||
|
kzls_bhop_china
|
||||||
|
smk_kzsca_factory
|
||||||
|
dyd_insulate
|
||||||
|
chk_cruel
|
||||||
|
kzy_juhxbhop
|
||||||
|
kzsca_snakebhop
|
||||||
|
kzro_tits
|
||||||
|
kz_kzdk_templebhop_h
|
||||||
|
fu_plainhop
|
||||||
|
kzse_bhopblock
|
||||||
|
bkz_bhopvalley
|
||||||
|
stf_creepytemple
|
||||||
|
qsk_azure
|
||||||
|
kz_synergy
|
||||||
|
fu_devhops
|
||||||
|
kzra_crystal_palace
|
||||||
|
nobkz_minimal
|
||||||
|
mad_bhopit
|
||||||
|
cg_coldbhop
|
||||||
|
hama_bricksv2
|
||||||
|
kz_waterplant
|
||||||
|
gbc_randombhop
|
||||||
|
kz_cellblock
|
||||||
|
j2s_4tunnels
|
||||||
|
bhop_perfect2012
|
||||||
|
kz_exodus_hard
|
||||||
|
kz_world
|
||||||
|
fb_ultimateclimb
|
||||||
|
kz_kzlt_dementia
|
||||||
|
radon_desertpassage
|
||||||
|
kzru_technology_x
|
||||||
|
kz_ascension_b8
|
||||||
|
bhop_mz_chaosmedia90
|
||||||
|
kz_wild
|
||||||
|
kzlt_dark_vault
|
||||||
|
daza_cobkz_inducility
|
||||||
|
hb_Creep
|
||||||
|
ytt_wow_mix
|
||||||
|
cd_bhop
|
||||||
|
kzra_stonebhop2
|
||||||
|
speed_ytt_castle
|
||||||
|
bkz_whatisthis
|
||||||
|
cg_coldbhop_v2
|
||||||
|
kzra_stonebhop
|
||||||
|
kz_kzdk_delianshop
|
||||||
|
kzdk_explorer_x
|
||||||
|
kzua_mk_illumina
|
||||||
|
av_degyptianez
|
||||||
|
kz_shrubhop_ez
|
||||||
|
kzarg_bhopcircuit
|
||||||
|
clintmo_bhopwarehouse
|
||||||
|
holy_lame
|
||||||
|
hb_inj3ct0r
|
||||||
|
bhop_gamebox
|
||||||
|
jro_goldbhop
|
||||||
|
dyd_brick
|
||||||
|
3T_xiaocaibi
|
||||||
|
kz_cg_venice
|
||||||
|
rr_inside^outside
|
||||||
|
1324_hellhouse
|
||||||
|
kz_rd_oldmine
|
||||||
|
clintmo_bhopbarrels
|
||||||
|
bhop_brainiac
|
||||||
|
cypress_bhoprun
|
||||||
|
kz-endo_toonbhopz
|
||||||
|
kzray_rocky-bhop
|
||||||
|
kz_kzsca_escape
|
||||||
|
mls_icefall_bhop
|
||||||
|
ce_house_3ways
|
||||||
|
fof_dale
|
||||||
|
kz_facility
|
||||||
|
4U_factory_wjs
|
||||||
|
ivns_arcadium
|
||||||
|
kzra_greencave
|
||||||
|
kzcn_2012
|
||||||
|
bkz_toonworld
|
||||||
|
kz_pacman
|
||||||
|
bhop_cave
|
||||||
|
Bhop_Blackjump
|
||||||
|
notkz_amazing
|
||||||
|
kzz_bhop
|
||||||
|
bw_pcjump
|
||||||
|
kz_bkz_egyptbhop
|
||||||
|
hb_PurpLeRainN
|
||||||
|
kz_cg_lavacliff
|
||||||
|
kzua_zp_godroom_h
|
||||||
|
bkm_problock
|
||||||
|
bhop_slackibira
|
||||||
|
sn_dustown
|
||||||
|
k_sun
|
||||||
|
holy_strafemaster
|
||||||
|
cg_d2block_h
|
||||||
|
smk_evergreen
|
||||||
|
fof_chillbhop
|
||||||
|
bhop_astro
|
||||||
|
ckz_corsair
|
||||||
|
kzblt_dx_blueshadow2
|
||||||
|
kz_dbh_pipehop
|
||||||
|
kzbr_hii_cartoonbhop
|
||||||
|
nz_playstation
|
||||||
|
kz_canyon
|
||||||
|
kz_shrubhop_h
|
||||||
|
kz_kzse_toonworld
|
||||||
|
bhop_cave2
|
||||||
|
kz_kzlt_femtobhop
|
||||||
|
kzex_darksiders
|
||||||
|
mh_bhopljs_h
|
||||||
|
j2s_4floors
|
||||||
|
daza_dimensionjumper
|
||||||
|
bkz_volcanobhop
|
||||||
|
mad_tomb
|
||||||
|
bhop_terrainhop
|
||||||
|
kzarg_lostrome
|
||||||
|
hb_DotAntipro
|
||||||
|
kz_kzfr_rabbithighway
|
||||||
|
cg_arizonabhop
|
||||||
|
bhop_darkstars
|
||||||
|
ugly_stairstoon
|
||||||
|
kz_ins_bhoptown
|
||||||
|
kztw_abyss_2014
|
||||||
|
cosy_cavebhop
|
||||||
|
fs_streetjump
|
||||||
|
gg_jackson2
|
||||||
|
sn_ezycity
|
||||||
|
bhop_avantura
|
||||||
|
rd_jump_house
|
||||||
|
kz_undergroundvillage
|
||||||
|
kz_giantbean_b15
|
||||||
|
kz-endo_carrington
|
||||||
|
daza_cityblock
|
||||||
|
kz_megabhop_hard
|
||||||
|
kz_synergy_x2
|
||||||
|
chip_bhopnoob_x
|
||||||
|
kzra_worlds
|
||||||
|
kz_kz-endo_portal
|
||||||
|
hfr_descent_h
|
||||||
|
bn_tombbhop
|
||||||
|
fu_bhop
|
||||||
|
kz-endo_topspeed
|
||||||
|
kzra_stoneishbhop
|
||||||
|
kz_cxg_jekyll
|
||||||
|
bkz_wallblock
|
||||||
|
cLt_firstbhop
|
||||||
|
klz_sherbrooke
|
||||||
|
kz-endo_blue
|
||||||
|
dyd_onlime
|
||||||
|
prochallenge_bhop
|
||||||
|
kzua_zp_cellaregypt
|
||||||
|
kzro_brickybhop
|
||||||
|
hm_crazystairs
|
||||||
|
kz_kzdk_covebhop
|
||||||
|
kz_satomi
|
||||||
|
kzblt_dx_mercy
|
||||||
|
bla_reactorhop
|
||||||
|
bhop_lego
|
||||||
|
kz_adventure
|
||||||
|
qsk_still
|
||||||
|
risk_snowcastle
|
||||||
|
kz_anubis
|
||||||
|
rush_adventure
|
||||||
|
bhop_kaninpuff
|
||||||
|
hit_canyonbhop
|
||||||
|
fu_frosty
|
||||||
|
kz_kzarg_catacombsbhop
|
||||||
|
cg_lighthops
|
||||||
|
rush_countless
|
||||||
|
ytt_light_stars
|
||||||
|
ml_monsterbhop
|
||||||
|
kzra_bhopmemories
|
||||||
|
kz_starwars_deeja
|
||||||
|
notkz_bhopcolour
|
||||||
|
kzsk_cubeblock
|
||||||
|
bhop_lyy_egypt
|
||||||
|
kzm_cityhops
|
||||||
|
kzro_excitedbhop
|
||||||
|
kz_owensvalley
|
||||||
|
kz_kzlv_wanderer
|
||||||
|
cnd_bairesbhop
|
||||||
|
kzra_somecaves
|
||||||
|
kz_bkz_tropicbhop
|
||||||
|
fof_utopia
|
||||||
|
bhop_colorhop
|
||||||
|
cosy_marioworld
|
||||||
|
mck_vudu
|
||||||
|
bhop_csr
|
||||||
|
cobkz_toonworld
|
||||||
|
kzsca_heaven
|
||||||
|
kz_synergy_x
|
||||||
|
fof_32
|
||||||
|
kzeed_prohop
|
||||||
|
kzarg_cellhop
|
||||||
|
fu_sane
|
||||||
|
bhop_jbg_grass
|
||||||
|
bhop_reys
|
||||||
|
ins_hlteaser
|
||||||
|
mls_floppytown_bh
|
||||||
|
kz_kzsca_still
|
||||||
|
kz-endo_congo
|
||||||
|
rvp_tundra-bhop
|
||||||
|
kz_radium
|
||||||
|
kzro_gohome
|
||||||
|
bkz_lostbase
|
||||||
|
kzr_greybhop
|
||||||
|
kzua_goldbhop_x
|
||||||
|
bhop_temple
|
||||||
|
kz_excavation
|
||||||
|
mls_stairsbhop
|
||||||
|
nobkz_mst_honduras_h
|
||||||
|
kzsk_rocksland
|
||||||
|
dr0_lost_sector
|
||||||
|
pro_kzcn_blow2
|
||||||
|
holy_somethingalamode
|
||||||
|
kzarg_ih_sandhop
|
||||||
|
kz_hopez
|
||||||
|
bhop_c21
|
255
amxmodx/configs/amxx.cfg
Executable file
255
amxmodx/configs/amxx.cfg
Executable file
|
@ -0,0 +1,255 @@
|
||||||
|
// AMX Mod X Configuration File
|
||||||
|
echo Executing AMX Mod X Configuration File
|
||||||
|
|
||||||
|
// Default access for all non admin players (see users.ini for access details)
|
||||||
|
//
|
||||||
|
// Default value: "z"
|
||||||
|
amx_default_access "z"
|
||||||
|
|
||||||
|
// Name of setinfo which should store a password on a client (you should change this)
|
||||||
|
// Note: Always prefix the field with an underscore (aka: "_")
|
||||||
|
// (Example: setinfo _pw "password")
|
||||||
|
//
|
||||||
|
// Default value: "_pw"
|
||||||
|
amx_password_field "_pw"
|
||||||
|
|
||||||
|
// Mode of logging to a server
|
||||||
|
// 0 - disable logging, players won't be checked (and access won't be set)
|
||||||
|
// 1 - normal mode which obey flags set in accounts
|
||||||
|
// 2 - kick all players not on list
|
||||||
|
//
|
||||||
|
// Default value: 1
|
||||||
|
amx_mode 1
|
||||||
|
|
||||||
|
// Show admins activity
|
||||||
|
// 0 - disabled
|
||||||
|
// 1 - show without admin name
|
||||||
|
// 2 - show with name
|
||||||
|
// 3 - show name only to admins, hide name from normal users
|
||||||
|
// 4 - show name only to admins, show nothing to normal users
|
||||||
|
// 5 - hide name only to admins, show nothing to normal users
|
||||||
|
//
|
||||||
|
// Default value: 2
|
||||||
|
amx_show_activity 2
|
||||||
|
|
||||||
|
// Frequency in seconds and text of scrolling message
|
||||||
|
//
|
||||||
|
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600
|
||||||
|
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600
|
||||||
|
|
||||||
|
// Center typed colored messages (last parameter is a color in RRRGGGBBB format)
|
||||||
|
//
|
||||||
|
// Default values: "Welcome to %hostname%" "000255100"
|
||||||
|
// "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255"
|
||||||
|
amx_imessage "Welcome to %hostname%" "000255100"
|
||||||
|
amx_imessage "This server is using AMX Mod X\nVisit http://www.amxmodx.org" "000100255"
|
||||||
|
|
||||||
|
// Frequency in seconds of colored messages
|
||||||
|
//
|
||||||
|
// Default value: 180
|
||||||
|
amx_freq_imessage 180
|
||||||
|
|
||||||
|
// Ban times for the main ban menu (amx_banmenu)
|
||||||
|
// Use 0 for permanent ban
|
||||||
|
// Default values: 0 5 10 15 30 45 60
|
||||||
|
amx_plmenu_bantimes 0 5 10 15 30 45 60
|
||||||
|
|
||||||
|
// Max temporary ban time (admins with ADMIN_BAN_TEMP access can't ban more than this time)
|
||||||
|
// time in minutes, 60 is 1 hour, 120 is 2 hours, 1440 is 1 day, and 10080 is 1 week
|
||||||
|
// Default value: 4320 aka 3 days
|
||||||
|
amx_tempban_maxtime 4320
|
||||||
|
|
||||||
|
// Slap damage amounts for the main slap menu (amx_slapmenu)
|
||||||
|
// Slay is automaticall inserted as the last option
|
||||||
|
// Default values: 0 1 5
|
||||||
|
amx_plmenu_slapdmg 0 1 5
|
||||||
|
|
||||||
|
// Set in seconds how fast players can chat (chat-flood protection)
|
||||||
|
//
|
||||||
|
// Default value: 0.75
|
||||||
|
amx_flood_time 0.75
|
||||||
|
|
||||||
|
// Amount of slots to reserve.
|
||||||
|
//
|
||||||
|
// Default value: 0
|
||||||
|
amx_reservation 0
|
||||||
|
|
||||||
|
// If you set this to 1, you can hide slots on your server.
|
||||||
|
// If server "full" of public slots and slots hidden, you must manually connect with connect console command
|
||||||
|
//
|
||||||
|
// Default value: 0
|
||||||
|
amx_hideslots 0
|
||||||
|
|
||||||
|
// Displaying of time remaining
|
||||||
|
// a - display white text on bottom
|
||||||
|
// b - use voice
|
||||||
|
// c - don't add "remaining" (only in voice)
|
||||||
|
// d - don't add "hours/minutes/seconds" (only in voice)
|
||||||
|
// e - show/speak if current time is less than this set in parameter
|
||||||
|
//
|
||||||
|
// Default value: "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11"
|
||||||
|
amx_time_display "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11"
|
||||||
|
|
||||||
|
// Announce "say thetime" and "say timeleft" with voice, set to 0 to disable.
|
||||||
|
//
|
||||||
|
// Default value: 1
|
||||||
|
amx_time_voice 1
|
||||||
|
|
||||||
|
// Display who votes for what option, set to 0 to disable, 1 to enable.
|
||||||
|
//
|
||||||
|
// Default value: 1
|
||||||
|
amx_vote_answers 1
|
||||||
|
|
||||||
|
// Some ratios for voting success
|
||||||
|
|
||||||
|
// Default value: 0.40
|
||||||
|
amx_votekick_ratio 0.40
|
||||||
|
|
||||||
|
// Default value: 0.40
|
||||||
|
amx_voteban_ratio 0.40
|
||||||
|
|
||||||
|
// Default value: 0.40
|
||||||
|
amx_votemap_ratio 0.40
|
||||||
|
|
||||||
|
// Default value: 0.02
|
||||||
|
amx_vote_ratio 0.02
|
||||||
|
|
||||||
|
// Max. time to which map can be extended
|
||||||
|
//
|
||||||
|
// Default value: 90
|
||||||
|
amx_extendmap_max 90
|
||||||
|
|
||||||
|
// Step for each extending
|
||||||
|
//
|
||||||
|
// Default value: 15
|
||||||
|
amx_extendmap_step 15
|
||||||
|
|
||||||
|
// Server language in ISO 639-1 format
|
||||||
|
// Please see data/lang/languages.txt file for a list of supported languages
|
||||||
|
//
|
||||||
|
// Default value: en
|
||||||
|
amx_language "en"
|
||||||
|
|
||||||
|
// If you set this to 0, clients cannot chose their language, instead they use
|
||||||
|
// whatever language the server is configured to use.
|
||||||
|
//
|
||||||
|
// Default value: 1
|
||||||
|
amx_client_languages 1
|
||||||
|
|
||||||
|
// If you set this to 0, clients will not see a message about amx_langmenu when they join the server
|
||||||
|
//
|
||||||
|
// Default value: 1
|
||||||
|
amx_language_display_msg 1
|
||||||
|
|
||||||
|
// If you set this to 0, clients will not see a message about amx_help when they join the server
|
||||||
|
//
|
||||||
|
// Default value: 1
|
||||||
|
amx_help_display_msg 1
|
||||||
|
|
||||||
|
// Time to wait (in seconds) before displaying a message about amx_help to a client once joined the server
|
||||||
|
//
|
||||||
|
// Default value: 15
|
||||||
|
amx_help_display_msg_time 15
|
||||||
|
|
||||||
|
// Amount of commands per amx_help page
|
||||||
|
//
|
||||||
|
// Default value: 10
|
||||||
|
amx_help_amount_per_page 10
|
||||||
|
|
||||||
|
// Plugin Debug mode
|
||||||
|
// 0 - No debugging (garbage line numbers)
|
||||||
|
// 1 - Plugins with "debug" option in plugins.ini are put into debug mode
|
||||||
|
// 2 - All plugins are put in debug mode
|
||||||
|
// Note - debug mode will affect JIT performance
|
||||||
|
//
|
||||||
|
// Default value: 1
|
||||||
|
amx_debug 0
|
||||||
|
|
||||||
|
// Plugin MultiLingual Debug
|
||||||
|
// To debug a language put its 2 letter code between quotes ("en", "de", etc)
|
||||||
|
// "" means disabled
|
||||||
|
//
|
||||||
|
// Default value: ""
|
||||||
|
amx_mldebug ""
|
||||||
|
|
||||||
|
//
|
||||||
|
// Beginning of Counter-Strike package specific configurations.
|
||||||
|
//
|
||||||
|
|
||||||
|
// Rank mode
|
||||||
|
// 0 - by nick
|
||||||
|
// 1 - by authid
|
||||||
|
// 2 - by ip
|
||||||
|
//
|
||||||
|
// Default value: 1
|
||||||
|
csstats_rank 1
|
||||||
|
|
||||||
|
// Max size of the stats file
|
||||||
|
//
|
||||||
|
// Default value: 3500
|
||||||
|
csstats_maxsize 3500
|
||||||
|
|
||||||
|
// Whether or not to rank bots with csstats - set to 1 to rank bots, 0 otherwise.
|
||||||
|
//
|
||||||
|
// Default value: 0
|
||||||
|
csstats_rankbots 0
|
||||||
|
|
||||||
|
// Duration of HUD-statistics
|
||||||
|
//
|
||||||
|
// Default value: 12.0
|
||||||
|
amx_statsx_duration 12.0
|
||||||
|
|
||||||
|
// HUD-statistics display limit relative round freeze end
|
||||||
|
// Negative time will clear the HUD-statstics before the round freeze time has ended
|
||||||
|
//
|
||||||
|
// Default value: -2.0
|
||||||
|
amx_statsx_freeze -2.0
|
||||||
|
|
||||||
|
// Sets whether Restrict Weapons plugin should use a configuration file per map or or not.
|
||||||
|
// If enabled, the file format is: weaprest_mapname.ini (e.g. weaprest_de_dust.ini).
|
||||||
|
// -
|
||||||
|
// Default value: 0
|
||||||
|
amx_restrmapsettings 0
|
||||||
|
|
||||||
|
sv_airaccelerate 100
|
||||||
|
|
||||||
|
sv_downloadurl "https://cs.f0.gg/cstrike"
|
||||||
|
sv_allowdownload 1
|
||||||
|
sv_allowupload 1
|
||||||
|
|
||||||
|
mp_round_infinite 1
|
||||||
|
mp_infinite_ammo 1
|
||||||
|
mp_auto_join_team 1
|
||||||
|
mp_autokick 0
|
||||||
|
humans_join_team CT
|
||||||
|
mp_scoreboard_showhealth -1
|
||||||
|
mp_scoreboard_showmoney -1
|
||||||
|
mp_scoreboard_showdefkit 0
|
||||||
|
|
||||||
|
sys_timing 1 // disables|enables plugin. Recommended: keep a base sys_tic in mapchangecfgfile.
|
||||||
|
sys_sleep 100 // Tic hibernation rate. The tic when there are 0 players.
|
||||||
|
sys_quota 2000 // Tic rate quota. The tic added per connected player.
|
||||||
|
|
||||||
|
// specinfo
|
||||||
|
si_enabled 1
|
||||||
|
si_list_enabled 1
|
||||||
|
si_keys_enabled 1
|
||||||
|
si_list_default 1
|
||||||
|
si_keys_default 1
|
||||||
|
si_immunity 1
|
||||||
|
|
||||||
|
// rtv
|
||||||
|
amx_emptymap "ml_monsterbhop"
|
||||||
|
amx_extendmap_max 90
|
||||||
|
amx_extendmap_step 15
|
||||||
|
amx_idletime 5
|
||||||
|
amx_show_activity 2
|
||||||
|
amx_staytime 300
|
||||||
|
amx_vote_answers 1
|
||||||
|
dmap_strict 0
|
||||||
|
emptymap_allowed 0
|
||||||
|
enforce_timelimit 0
|
||||||
|
mp_timelimit 30
|
||||||
|
nominations_allowed 1
|
||||||
|
weapon_delay 1
|
||||||
|
dmap_rtvwait 0
|
17
amxmodx/configs/clcmds.ini
Executable file
17
amxmodx/configs/clcmds.ini
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
; Menu configuration file
|
||||||
|
; File location: $moddir/addons/amxmodx/configs/clcmds.ini
|
||||||
|
; To use with Players Menu plugin
|
||||||
|
|
||||||
|
; NOTE: By default in all settings the access level is set to "u".
|
||||||
|
; However you can change that, to limit the access to some settings.
|
||||||
|
|
||||||
|
; Client Commands Menu: ; < description > < command > < flags > < access level >
|
||||||
|
; "a" - execute from server console
|
||||||
|
; "b" - execute from admin console
|
||||||
|
; "c" - execute on selected player
|
||||||
|
; "d" - back to menu when executed
|
||||||
|
|
||||||
|
"Kick player" "amx_kick #%userid%" "b" "u"
|
||||||
|
"Slay player" "amx_slay #%userid%" "bd" "u"
|
||||||
|
"Slap with 1 dmg." "amx_slap #%userid% 1" "bd" "u"
|
||||||
|
"Ban for 5 minutes" "amx_ban #%userid% 5" "b" "u"
|
126
amxmodx/configs/cmdaccess.ini
Normal file
126
amxmodx/configs/cmdaccess.ini
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
; This file will store the commands used by plugins, and their access level
|
||||||
|
; To change the access of a command, edit the flags beside it and then
|
||||||
|
; change the server's map.
|
||||||
|
;
|
||||||
|
; Example: If I wanted to change the amx_slap access to require
|
||||||
|
; RCON access (flag "l") I would change this:
|
||||||
|
; "amx_slap" "e" ; admincmd.amxx
|
||||||
|
; To this:
|
||||||
|
; "amx_slap" "l" ; admincmd.amxx
|
||||||
|
;
|
||||||
|
; To disable a specific command from being used with the command manager
|
||||||
|
; and to only use the plugin-specified access set the flag to "!"
|
||||||
|
;
|
||||||
|
; NOTE: The plugin name at the end is just for reference to what plugin
|
||||||
|
; uses what commands. It is ignored.
|
||||||
|
|
||||||
|
"amx_reloadadmins" "h" ; admin_sql.amxx
|
||||||
|
"amx_addadmin" "l" ; admin_sql.amxx
|
||||||
|
"amx_kick" "c" ; admincmd.amxx
|
||||||
|
"amx_ban" "d" ; admincmd.amxx
|
||||||
|
"amx_banip" "d" ; admincmd.amxx
|
||||||
|
"amx_addban" "d" ; admincmd.amxx
|
||||||
|
"amx_unban" "d" ; admincmd.amxx
|
||||||
|
"amx_slay" "e" ; admincmd.amxx
|
||||||
|
"amx_slap" "e" ; admincmd.amxx
|
||||||
|
"amx_leave" "c" ; admincmd.amxx
|
||||||
|
"amx_pause" "g" ; admincmd.amxx
|
||||||
|
"amx_who" "y" ; admincmd.amxx
|
||||||
|
"amx_cvar" "g" ; admincmd.amxx
|
||||||
|
"amx_plugins" "y" ; admincmd.amxx
|
||||||
|
"amx_modules" "y" ; admincmd.amxx
|
||||||
|
"amx_map" "f" ; admincmd.amxx
|
||||||
|
"amx_cfg" "h" ; admincmd.amxx
|
||||||
|
"amx_nick" "e" ; admincmd.amxx
|
||||||
|
"amx_last" "d" ; admincmd.amxx
|
||||||
|
"amx_rcon" "l" ; admincmd.amxx
|
||||||
|
"amx_showrcon" "l" ; admincmd.amxx
|
||||||
|
"amx_help" "" ; adminhelp.amxx
|
||||||
|
"amx_setlang" "h" ; multilingual.amxx
|
||||||
|
"amx_langmenu" "" ; multilingual.amxx
|
||||||
|
"amxmodmenu" "u" ; menufront.amxx
|
||||||
|
"amx_menu" "" ; menufront.amxx
|
||||||
|
"amx_cmdmenu" "u" ; cmdmenu.amxx
|
||||||
|
"amx_cfgmenu" "u" ; cmdmenu.amxx
|
||||||
|
"amx_speechmenu" "u" ; cmdmenu.amxx
|
||||||
|
"amx_cvarmenu" "g" ; cmdmenu.amxx
|
||||||
|
"amx_kickmenu" "c" ; plmenu.amxx
|
||||||
|
"amx_banmenu" "d" ; plmenu.amxx
|
||||||
|
"amx_slapmenu" "e" ; plmenu.amxx
|
||||||
|
"amx_teammenu" "m" ; plmenu.amxx
|
||||||
|
"amx_clcmdmenu" "m" ; plmenu.amxx
|
||||||
|
"amx_teleportmenu" "h" ; telemenu.amxx
|
||||||
|
"amx_mapmenu" "f" ; mapsmenu.amxx
|
||||||
|
"amx_votemapmenu" "j" ; mapsmenu.amxx
|
||||||
|
"amx_plugincvarmenu" "g" ; pluginmenu.amxx
|
||||||
|
"amx_plugincmdmenu" "u" ; pluginmenu.amxx
|
||||||
|
"amx_say" "i" ; adminchat.amxx
|
||||||
|
"amx_chat" "i" ; adminchat.amxx
|
||||||
|
"amx_psay" "i" ; adminchat.amxx
|
||||||
|
"amx_tsay" "i" ; adminchat.amxx
|
||||||
|
"amx_csay" "i" ; adminchat.amxx
|
||||||
|
"amx_votemap" "j" ; adminvote.amxx
|
||||||
|
"amx_votekick" "j" ; adminvote.amxx
|
||||||
|
"amx_voteban" "j" ; adminvote.amxx
|
||||||
|
"amx_vote" "j" ; adminvote.amxx
|
||||||
|
"amx_cancelvote" "j" ; adminvote.amxx
|
||||||
|
"amx_pausecfg" "h" ; pausecfg.amxx
|
||||||
|
"amx_pausecfgmenu" "h" ; pausecfg.amxx
|
||||||
|
"amx_off" "h" ; pausecfg.amxx
|
||||||
|
"amx_on" "h" ; pausecfg.amxx
|
||||||
|
"kz_mpbhop" "h" ; mpbhop.amxx
|
||||||
|
"kz_mpbhop_entitytouch" "h" ; mpbhop.amxx
|
||||||
|
"kz_safe_inform" "h" ; mpbhop.amxx
|
||||||
|
"kz_mpbhopmenu" "h" ; mpbhop.amxx
|
||||||
|
"kz_showblocks" "h" ; mpbhop.amxx
|
||||||
|
"+hook" "c" ; prokreedz.amxx
|
||||||
|
"-hook" "c" ; prokreedz.amxx
|
||||||
|
"kz_hook" "c" ; prokreedz.amxx
|
||||||
|
"mapm_debug" "f" ; mapmanager.amxx
|
||||||
|
"mapm_startvote" "f" ; mapmanager.amxx
|
||||||
|
"mapm_stopvote" "f" ; mapmanager.amxx
|
||||||
|
"gal_startvote" "f" ; galileo.amxx
|
||||||
|
"gal_cancelvote" "f" ; galileo.amxx
|
||||||
|
"gal_changelevel" "f" ; galileo.amxx
|
||||||
|
"gal_createmapfile" "l" ; galileo.amxx
|
||||||
|
"gal_maintenance_mode" "l" ; galileo.amxx
|
||||||
|
"gal_look_for_crashes" "l" ; galileo.amxx
|
||||||
|
"gal_votemap" "f" ; galileo.amxx
|
||||||
|
"cm_reload" "l" ; crx_chatmanager.amxx
|
||||||
|
"kzmapdl" "f" ; kz_map_downloader.amxx
|
||||||
|
"amx_adminpassword" "l" ; admins_manager.amxx
|
||||||
|
"amx_adminaccount" "l" ; admins_manager.amxx
|
||||||
|
"amx_fakeping" "c" ; pingfaker.amxx
|
||||||
|
"kzr_update" "l" ; kzrecords.amxx
|
||||||
|
"amx_xvar_float" "g" ; admincmd.amxx
|
||||||
|
"amx_xvar_int" "g" ; admincmd.amxx
|
||||||
|
"amx_extendmap" "f" ; admincmd.amxx
|
||||||
|
"amx_searchcmd" "" ; adminhelp.amxx
|
||||||
|
"say" "i" ; adminchat.amxx
|
||||||
|
"amx_votenextmap" "j" ; mapchooser4.amxx
|
||||||
|
"amx_listmaps2" "" ; mapchooser4.amxx
|
||||||
|
"amx_nextmap_vote" "f" ; rtv.amxx
|
||||||
|
"votemap" "" ; deagsmapmanager.amxx
|
||||||
|
"dmap_help" "" ; deagsmapmanager.amxx
|
||||||
|
"dmap_status" "m" ; deagsmapmanager.amxx
|
||||||
|
"dmap_votemode" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_cyclemode" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_banlastmaps" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_quietmode" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_freeze" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_messages" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_rtvtoggle" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_rockthevote" "m" ; deagsmapmanager.amxx
|
||||||
|
"amx_rockthevote" "m" ; deagsmapmanager.amxx
|
||||||
|
"amx_rtv" "m" ; deagsmapmanager.amxx
|
||||||
|
"dmap_rtvpercent" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_rtvplayers" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_rtvwait" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_default" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_mapsurl" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_mapsnum" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_nominations" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_maxcustom" "r" ; deagsmapmanager.amxx
|
||||||
|
"dmap_cancelvote" "m" ; deagsmapmanager.amxx
|
||||||
|
"dmap_nominate" "m" ; deagsmapmanager.amxx
|
||||||
|
"listmaps" "" ; deagsmapmanager.amxx
|
16
amxmodx/configs/cmds.ini
Executable file
16
amxmodx/configs/cmds.ini
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
; Menu configuration file
|
||||||
|
; File location: $moddir/addons/amxmodx/configs/cmds.ini
|
||||||
|
; To use with Commands Menu plugin
|
||||||
|
|
||||||
|
; NOTE: By default in all settings the access level is set to "u".
|
||||||
|
; However you can change that, to limit the access to some settings.
|
||||||
|
|
||||||
|
; Commands Menu: ; < description > < command > < flags > < access level >
|
||||||
|
; "a" - execute from server console
|
||||||
|
; "b" - execute from admin console
|
||||||
|
; "c" - execute on all clients
|
||||||
|
; "d" - back to menu when executed
|
||||||
|
|
||||||
|
"Pause" "amx_pause" "ad" "u"
|
||||||
|
" " "-" "" "u"
|
||||||
|
"Restart Round" "sv_restartround 1" "a" "u"
|
22
amxmodx/configs/configs.ini
Executable file
22
amxmodx/configs/configs.ini
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
; Menu configuration file
|
||||||
|
; File location: $moddir/addons/amxmodx/configs/configs.ini
|
||||||
|
; To use with Commands Menu plugin
|
||||||
|
|
||||||
|
; NOTE: By default in all settings the access level is set to "u".
|
||||||
|
; However you can change that, to limit the access to some settings.
|
||||||
|
|
||||||
|
; Commands Menu:
|
||||||
|
; < description > < command > < flags > < access level >
|
||||||
|
; "a" - execute from server console
|
||||||
|
; "b" - execute from admin console
|
||||||
|
; "c" - execute on all clients
|
||||||
|
; "d" - back to menu when executed
|
||||||
|
|
||||||
|
;"PUBLIC Settings" "servercfgfile server.cfg;exec server.cfg" "a" "u"
|
||||||
|
;"Clanbase" "exec clanbase.cfg;servercfgfile \'\'" "a" "u"
|
||||||
|
;"Clanbase Charges Only" "exec clanbase_co.cfg;servercfgfile \'\'" "a" "u"
|
||||||
|
;"Official CAL Match" "exec cal.cfg;servercfgfile \'\'" "a" "u"
|
||||||
|
;"ProvingGrounds Server Config" "exec leagues/pg.cfg;servercfgfile \'\'" "a" "u"
|
||||||
|
;"OGL CS Server Config" "exec ogl.cfg;servercfgfile \'\'" "a" "u"
|
||||||
|
;"OGL CS FF Server Config" "exec ogl_ff.cfg;servercfgfile \'\'" "a" "u"
|
||||||
|
;"OGL CS Advanced Server Config" "exec ogl_adv.cfg;servercfgfile \'\'" "a" "u"
|
50
amxmodx/configs/core.ini
Executable file
50
amxmodx/configs/core.ini
Executable file
|
@ -0,0 +1,50 @@
|
||||||
|
; Configuration file for AMX Mod X
|
||||||
|
amxx_logs addons/amxmodx/logs
|
||||||
|
amxx_configsdir addons/amxmodx/configs
|
||||||
|
amxx_datadir addons/amxmodx/data
|
||||||
|
amxx_modules addons/amxmodx/configs/modules.ini
|
||||||
|
amxx_plugins addons/amxmodx/configs/plugins.ini
|
||||||
|
amxx_pluginsdir addons/amxmodx/plugins
|
||||||
|
amxx_modulesdir addons/amxmodx/modules
|
||||||
|
amxx_vault addons/amxmodx/data/vault.ini
|
||||||
|
; It is important that "csstats" comes before "csstats_score"
|
||||||
|
csstats addons/amxmodx/data/csstats.dat
|
||||||
|
csstats_score addons/amxmodx/data/csstats.amxx
|
||||||
|
|
||||||
|
; Logging mode
|
||||||
|
; 0 - no logging
|
||||||
|
; 1 - one logfile / day
|
||||||
|
; 2 - one logfile / map
|
||||||
|
; 3 - HL Logs
|
||||||
|
amxx_logging 1
|
||||||
|
|
||||||
|
; MySQL default timeout
|
||||||
|
mysql_timeout 60
|
||||||
|
|
||||||
|
; Binary logging level
|
||||||
|
; add these up to get what you want
|
||||||
|
; these only work with bin logging binaries
|
||||||
|
; 1 - default
|
||||||
|
; 2 - log internal string sets/gets
|
||||||
|
; 4 - log internal formats
|
||||||
|
; 8 - log all native params
|
||||||
|
; 16 - log internal function calls (only in debug mode)
|
||||||
|
; 32 - log line number accesses (only in debug mode)
|
||||||
|
bin_logging 49
|
||||||
|
|
||||||
|
; Maximum binary log size, in megs
|
||||||
|
max_binlog_size 20
|
||||||
|
|
||||||
|
; Plugin optimization flags - add these up to get what you want
|
||||||
|
; lowering these may stop crashes on very old CPUs
|
||||||
|
; set 65536 to disable optimizer, NOT 0!
|
||||||
|
;-------------
|
||||||
|
; 1 - float arithmetic
|
||||||
|
; 2 - float comparisons
|
||||||
|
; 4 - float rounding
|
||||||
|
optimizer 7
|
||||||
|
|
||||||
|
; Admin command flag manager
|
||||||
|
; 0 - enabled
|
||||||
|
; 1 - disabled
|
||||||
|
disableflagman 0
|
19
amxmodx/configs/custommenuitems.cfg
Executable file
19
amxmodx/configs/custommenuitems.cfg
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
// Here you can add menu items from any plugin to Menus Front-End plugin, aka "amxmodmenu".
|
||||||
|
// You can also add menu items to the normal non-admin client menu "amx_menu".
|
||||||
|
//
|
||||||
|
// Adding to "amxmodmenu":
|
||||||
|
// Usage: "amx_addmenuitem <menu text> <menu command> <access flags> <plugin name>"
|
||||||
|
//
|
||||||
|
// Adding to "amx_menu":
|
||||||
|
// Usage: "amx_addclientmenuitem <menu text> <menu command> <access flags> <plugin name>"
|
||||||
|
//
|
||||||
|
// <menu text>: This is the text displayed in the menu itself for this item.
|
||||||
|
// <menu command>: This is the client command used to access the menu.
|
||||||
|
// <access flags>: Specify what access flags admins must have to use this menu item. (Check users.ini for access flags.)
|
||||||
|
// <plugin name>: This must be the _exact_ (though case insensitive) name of the plugin which holds the menu command. (Use "amxx plugins" in server console, plugin names are listed in Name column.)
|
||||||
|
//
|
||||||
|
// Example: (be sure to use quotes around parameters with spaces!)
|
||||||
|
//
|
||||||
|
// amx_addmenuitem "Weapon Arena" "weaponarena_menu" "hu" "Weapon Arena"
|
||||||
|
// amx_addclientmenuitem "Warcraft 3" "war3menu" "" "Warcraft 3 XP"
|
||||||
|
|
22
amxmodx/configs/cvars.ini
Executable file
22
amxmodx/configs/cvars.ini
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
; Menu configuration file
|
||||||
|
; File location: $moddir/addons/amxmodx/configs/cvars.ini
|
||||||
|
; To use with Commands Menu plugin
|
||||||
|
|
||||||
|
; Cvars Menu:
|
||||||
|
; < cvar > < values > ... < access level >
|
||||||
|
|
||||||
|
"mp_timelimit" "0" "30" "45" "u"
|
||||||
|
"sv_password" "" "mypw" "clanwar" "u"
|
||||||
|
"pausable" "0" "1" "u"
|
||||||
|
"sv_voiceenable" "0" "1" "u"
|
||||||
|
"mp_chattime" "0" "1" "3" "u"
|
||||||
|
"mp_logmessages" "0" "1" "u"
|
||||||
|
"mp_friendlyfire" "0" "1" "u"
|
||||||
|
"mp_limitteams" "0" "1" "2" "u"
|
||||||
|
"mp_autoteambalance" "0" "1" "2" "u"
|
||||||
|
"allow_spectators" "0" "1" "u"
|
||||||
|
"mp_freezetime" "0" "6" "u"
|
||||||
|
"mp_buytime" "1" "0.5" "u"
|
||||||
|
"mp_startmoney" "800" "1800" "3600" "u"
|
||||||
|
"mp_c4timer" "35" "45" "15" "u"
|
||||||
|
"mp_forcechasecam" "0" "1" "2" "u"
|
4719
amxmodx/configs/hamdata.ini
Normal file
4719
amxmodx/configs/hamdata.ini
Normal file
File diff suppressed because it is too large
Load Diff
92
amxmodx/configs/kz/start.ini
Normal file
92
amxmodx/configs/kz/start.ini
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
kz_cfl_ceramicblock 482.552185 -607.127197 -154.968750
|
||||||
|
kz_kzsca_toonworld2 -184.377380 2141.364013 52.009040
|
||||||
|
uq_suncliff -431.652618 -512.236206 -219.968750
|
||||||
|
kz_cg_wigbl0ck -490.224151 -81.784660 84.031250
|
||||||
|
kzus_pharaohs_complex 459.919860 2872.557128 -412.743377
|
||||||
|
kz_cg_extreme 3380.907958 3281.780029 -887.968750
|
||||||
|
notkz_very-easy 797.561828 447.679626 -155.968750
|
||||||
|
kz_waterplant 638.881042 1032.994750 -3063.968750
|
||||||
|
kz_cellblock -672.996215 -479.054199 -3563.968750
|
||||||
|
cg_cbblebhop 792.860534 -3909.157714 37.031250
|
||||||
|
cg_beginner 241.153610 -2497.370117 -2091.968750
|
||||||
|
av_degyptianez -374.001434 -2854.653076 -443.968750
|
||||||
|
bkz_goldbhop -3494.738037 -3368.443847 36.031250
|
||||||
|
risk_lego_firehouse 741.396850 1123.125976 -99.968750
|
||||||
|
bkz_wallblock -2644.146240 -20.633344 -3867.968750
|
||||||
|
slide_kzfr_glass 1094.802612 3215.976806 2980.031250
|
||||||
|
slide_kzfr_valley -2185.127685 2264.824218 2996.031250
|
||||||
|
kz_cfl_mountainchurch -759.735412 -740.729675 -411.968750
|
||||||
|
dr0_surfari -1575.641601 2448.921875 -2520.968750
|
||||||
|
cg_gridblock -108.453140 290.916717 36.031250
|
||||||
|
kz_man_halloween2004 3545.014892 2645.649414 2532.031250
|
||||||
|
kz_ea_caveclimb_e 1952.570922 -1013.018859 -1107.968750
|
||||||
|
pbkz_superbhop -297.601928 62.950740 -86.268447
|
||||||
|
carg_autumn -430.499023 -770.796997 -123.968750
|
||||||
|
kz_kzlt_dementia 3300.939941 -3074.375000 -3579.968750
|
||||||
|
ins_kurenogoes17 -706.367187 86.354331 100.031250
|
||||||
|
kz_faith 38.791370 -24.602649 -27.968750
|
||||||
|
gayl0rd_bhop 70.699287 -1357.202758 36.031250
|
||||||
|
kz_cg_pianoclimb 1260.391967 -731.549621 -731.968750
|
||||||
|
kz_hop 1534.196899 3087.901123 -827.968750
|
||||||
|
cypress_mariorun 1533.891845 -420.592376 -347.968750
|
||||||
|
kz_kzdk_radiobase 105.843444 8.725816 -251.968750
|
||||||
|
cypress_waterfall 227.277252 -727.978027 -475.968750
|
||||||
|
risk_stargate -909.051025 -2044.077636 -67.968750
|
||||||
|
kz_emblem -183.011322 1142.139892 -3227.968750
|
||||||
|
risk_snowcastle 166.539596 2789.058837 -299.968750
|
||||||
|
kzno_xtremeblock -609.514709 -262.755523 3108.031250
|
||||||
|
kz_sandblock2_ez 914.473083 819.916992 -2451.968750
|
||||||
|
cypress_maya 80.000000 -544.000000 -476.000000
|
||||||
|
kzcn_mount 803.516113 1703.370849 92.031250
|
||||||
|
fof_chillbhop -3225.228271 3085.548339 36.031250
|
||||||
|
kz_sola -782.678161 20.899518 420.031250
|
||||||
|
kz_kzdk_templebhop -686.047180 -1061.353393 -91.968750
|
||||||
|
kz_kzse_toonworld -1687.922851 -66.802017 532.031250
|
||||||
|
kz_adventure2 -307.807128 -498.900390 -667.968750
|
||||||
|
de_dust2 160.000000 2464.000000 -91.968750
|
||||||
|
fof_dale 250.028884 -446.229461 -1147.968750
|
||||||
|
-3483.158203 -3445.133300 36.031250
|
||||||
|
kz_longjumps2 29.943288 -63.099910 -27.968750
|
||||||
|
kz_synergy_x -386.782958 -3104.565917 -3803.968750
|
||||||
|
kzua_zp_egypthops 783.406127 -2591.112060 468.031250
|
||||||
|
fof_utopia -1609.442504 -1242.913085 -1739.968750
|
||||||
|
3T_xiaocaibi -1556.977416 2824.364746 917.163391
|
||||||
|
4U_factory_wjs -3012.511718 -772.218627 -219.968749
|
||||||
|
Bhop_Blackjump -2098.711669 -2751.591064 -283.968749
|
||||||
|
ml_monsterbhop -198.276519 -2570.185058 996.031249
|
||||||
|
bhkz_bronzebhop -3777.534667 -3779.836425 100.031249
|
||||||
|
1324_hellhouse -191.299346 1139.644165 -923.968749
|
||||||
|
bhop_cave2 -2913.318359 -1976.860961 -459.958282
|
||||||
|
kzua_zp_hamunaptra_x 510.950561 2592.031249 -2811.968749
|
||||||
|
bk_bhop 1096.847290 -1247.442382 132.031249
|
||||||
|
bhop_temple 28.047641 -412.206817 -91.968749
|
||||||
|
rkz_easy_bhop_cross_runner -430.302947 -235.016326 -155.968749
|
||||||
|
bhop_platinum -2769.455078 -2053.750732 36.031249
|
||||||
|
kzro_brickybhop 72.729797 -86.958480 -475.968749
|
||||||
|
d2_mario_bhop 869.261291 -335.439788 116.031249
|
||||||
|
kzro_jaashsbhop -881.666259 440.452819 164.031249
|
||||||
|
kzro_bhopbl0ck 663.665161 -3238.708496 -1403.968749
|
||||||
|
bhop_cave 1239.796997 -845.409179 -464.194946
|
||||||
|
kz-endo_bikinihop 85.550720 -856.860961 -459.968749
|
||||||
|
cnd_bairesbhop -1081.642944 62.961006 100.031249
|
||||||
|
bhop_slackibira -358.630645 -175.599151 -155.968749
|
||||||
|
nobkz_minimal -2046.550659 2785.161865 132.031249
|
||||||
|
1324_svalley -233.489471 121.547187 -59.999992
|
||||||
|
kzr_greybhop -3436.196777 -1462.296997 164.031249
|
||||||
|
bkm_problock 1129.148071 1097.507202 164.031249
|
||||||
|
cLt_firstbhop 146.479812 369.555725 -36.968749
|
||||||
|
bhop_aeonflux -2065.736083 -459.436126 -219.968749
|
||||||
|
holy_lame -897.203613 2006.934326 -411.968749
|
||||||
|
kz_nobkz_factoryrun -2853.400146 -3523.885009 3108.031249
|
||||||
|
kzarg_ih_sandhop 2312.964599 -2571.216552 -75.968749
|
||||||
|
kzua_mk_illumina_h -22.185686 265.968749 -31.968749
|
||||||
|
py_mix 818.165039 -2888.277832 -219.968749
|
||||||
|
bhop_blocks -198.061599 -599.801635 36.031249
|
||||||
|
bhop_brainiac 158.726745 -2991.689208 68.031249
|
||||||
|
BBbhop -3143.772949 2425.358886 -1115.968749
|
||||||
|
kzsca_snakebhop 2995.236328 -3328.874755 2708.031249
|
||||||
|
cypress_p0burkan -51.607265 -1240.702636 -155.968749
|
||||||
|
bkz_bhopaztec -2838.329833 40.871498 132.031250
|
||||||
|
cg_lighthops 959.825988 -1805.003906 -315.968750
|
||||||
|
bkz_junglebhop -2926.710693 -2886.644775 -1371.968750
|
||||||
|
bhop_kaninpuff 1133.260009 59.047939 -123.968750
|
5
amxmodx/configs/maphist.ini
Normal file
5
amxmodx/configs/maphist.ini
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
gayl0rd_bhop
|
||||||
|
gayl0rd_bhop
|
||||||
|
gayl0rd_bhop
|
||||||
|
gayl0rd_bhop
|
||||||
|
gayl0rd_bhop
|
322
amxmodx/configs/maps.ini
Executable file
322
amxmodx/configs/maps.ini
Executable file
|
@ -0,0 +1,322 @@
|
||||||
|
1324_hellhouse
|
||||||
|
1324_svalley
|
||||||
|
3T_xiaocaibi
|
||||||
|
4U_factory_wjs
|
||||||
|
BBbhop
|
||||||
|
Bhop_Blackjump
|
||||||
|
av_degyptianez
|
||||||
|
bhkz_bronzebhop
|
||||||
|
bhop_aeonflux
|
||||||
|
bhop_astro
|
||||||
|
bhop_avantura
|
||||||
|
bhop_blocks
|
||||||
|
bhop_brainiac
|
||||||
|
bhop_c21
|
||||||
|
bhop_cave
|
||||||
|
bhop_cave2
|
||||||
|
bhop_colorhop
|
||||||
|
bhop_csr
|
||||||
|
bhop_darkstars
|
||||||
|
bhop_dustzone
|
||||||
|
bhop_fabrit
|
||||||
|
bhop_gamebox
|
||||||
|
bhop_its_2caves
|
||||||
|
bhop_jbg_grass
|
||||||
|
bhop_kaninpuff
|
||||||
|
bhop_lego
|
||||||
|
bhop_lyy_egypt
|
||||||
|
bhop_mz_chaosmedia90
|
||||||
|
bhop_perfect2012
|
||||||
|
bhop_platinum
|
||||||
|
bhop_reys
|
||||||
|
bhop_slackibira
|
||||||
|
bhop_temple
|
||||||
|
bhop_terrainhop
|
||||||
|
bhop_tropic_h
|
||||||
|
bk_bhop
|
||||||
|
bk_icerock
|
||||||
|
bkm_problock
|
||||||
|
bkz_bhopaztec
|
||||||
|
bkz_bhopvalley
|
||||||
|
bkz_dqvolski_most
|
||||||
|
bkz_forestrace
|
||||||
|
bkz_goldbhop
|
||||||
|
bkz_goldbhop_v2
|
||||||
|
bkz_junglebhop
|
||||||
|
bkz_lostbase
|
||||||
|
bkz_noob
|
||||||
|
bkz_toonworld
|
||||||
|
bkz_volcanobhop
|
||||||
|
bkz_wallblock
|
||||||
|
bkz_whatisthis
|
||||||
|
bkzgt_aasault
|
||||||
|
bla_reactorhop
|
||||||
|
bn_tombbhop
|
||||||
|
bw_pcjump
|
||||||
|
cLt_firstbhop
|
||||||
|
cah_lost
|
||||||
|
cd_bhop
|
||||||
|
ce_house_3ways
|
||||||
|
cg_arizonabhop
|
||||||
|
cg_cbblebhop
|
||||||
|
cg_coldbhop
|
||||||
|
cg_coldbhop_v2
|
||||||
|
cg_d2block_h
|
||||||
|
cg_lighthops
|
||||||
|
cg_wildwesthop
|
||||||
|
chip_bhopnoob_x
|
||||||
|
chk_cruel
|
||||||
|
ckz_corsair
|
||||||
|
clintmo_bhopbarrels
|
||||||
|
clintmo_bhoptoon
|
||||||
|
clintmo_bhopwarehouse
|
||||||
|
cnd_bairesbhop
|
||||||
|
cobkz_toonworld
|
||||||
|
coma_X
|
||||||
|
cosy_cavebhop
|
||||||
|
cosy_marioworld
|
||||||
|
cypress_bhoprun
|
||||||
|
cypress_p0burkan
|
||||||
|
cypress_volcancliff
|
||||||
|
d2_mario_bhop
|
||||||
|
daza_cityblock
|
||||||
|
daza_cobkz_inducility
|
||||||
|
daza_colorswitch
|
||||||
|
daza_dimensionjumper
|
||||||
|
doze_ljrun
|
||||||
|
dr0_lost_sector
|
||||||
|
dyd_bhop
|
||||||
|
dyd_brick
|
||||||
|
dyd_hb_betty_k
|
||||||
|
dyd_insulate
|
||||||
|
dyd_onlime
|
||||||
|
dyd_toonblock
|
||||||
|
etl_forsakenblock
|
||||||
|
etl_spacebhop
|
||||||
|
fb_ultimateclimb
|
||||||
|
firs_room_x
|
||||||
|
fof_32
|
||||||
|
fof_chillbhop
|
||||||
|
fof_dale
|
||||||
|
fof_utopia
|
||||||
|
fs_streetjump
|
||||||
|
ftw_deathzone
|
||||||
|
fu_bawhop
|
||||||
|
fu_bhop
|
||||||
|
fu_devhops
|
||||||
|
fu_frosty
|
||||||
|
fu_plainhop
|
||||||
|
fu_replayhop
|
||||||
|
fu_sane
|
||||||
|
gayl0rd_bhop
|
||||||
|
gbc_randombhop
|
||||||
|
gbc_towers2
|
||||||
|
gg_jackson2
|
||||||
|
ham_bricks
|
||||||
|
hama_bricksv2
|
||||||
|
hb_Creep
|
||||||
|
hb_DotAntipro
|
||||||
|
hb_PurpLeRainN
|
||||||
|
hb_inj3ct0r
|
||||||
|
hb_lambdaaa
|
||||||
|
hb_patchouli
|
||||||
|
hfr_302
|
||||||
|
hfr_descent_h
|
||||||
|
hit_canyonbhop
|
||||||
|
hm_crazystairs
|
||||||
|
holy_lame
|
||||||
|
holy_somethingalamode
|
||||||
|
holy_strafemaster
|
||||||
|
imkz_tsfh
|
||||||
|
ins_blueline
|
||||||
|
ins_hlteaser
|
||||||
|
ivns_arcadium
|
||||||
|
j2s_4floors
|
||||||
|
j2s_4tunnels
|
||||||
|
j2s_autumn
|
||||||
|
j2s_sandland
|
||||||
|
jail_logo
|
||||||
|
jro_goldbhop
|
||||||
|
k_sun
|
||||||
|
kaspek_caverna_v1
|
||||||
|
kek_google
|
||||||
|
kg_duckhops_flawless
|
||||||
|
klz_sherbrooke
|
||||||
|
ksz_zuma
|
||||||
|
kz-endo_bikinihop
|
||||||
|
kz-endo_blue
|
||||||
|
kz-endo_carrington
|
||||||
|
kz-endo_congo
|
||||||
|
kz-endo_toonbhopz
|
||||||
|
kz-endo_topspeed
|
||||||
|
kz_6fd_volcano
|
||||||
|
kz_adventure
|
||||||
|
kz_anubis
|
||||||
|
kz_ascension_b8
|
||||||
|
kz_bkz_egyptbhop
|
||||||
|
kz_bkz_tropicbhop
|
||||||
|
kz_canyon
|
||||||
|
kz_cellblock
|
||||||
|
kz_cg_lavacliff
|
||||||
|
kz_cg_venice
|
||||||
|
kz_cg_xtremedesert
|
||||||
|
kz_cxg_jekyll
|
||||||
|
kz_dbh_pipehop
|
||||||
|
kz_deathvalley
|
||||||
|
kz_excavation
|
||||||
|
kz_exodus_hard
|
||||||
|
kz_facility
|
||||||
|
kz_giantbean_b15
|
||||||
|
kz_heat
|
||||||
|
kz_hopez
|
||||||
|
kz_indusrun
|
||||||
|
kz_ins_ancientgardens
|
||||||
|
kz_ins_bhoptown
|
||||||
|
kz_j2s_cupblock
|
||||||
|
kz_j2s_icevalley
|
||||||
|
kz_j2s_westbl0ck
|
||||||
|
kz_kz-endo_portal
|
||||||
|
kz_kzarg_catacombsbhop
|
||||||
|
kz_kzdk_covebhop
|
||||||
|
kz_kzdk_delianshop
|
||||||
|
kz_kzdk_templebhop_h
|
||||||
|
kz_kzfr_rabbithighway
|
||||||
|
kz_kzlt_dementia
|
||||||
|
kz_kzlt_femtobhop
|
||||||
|
kz_kzlv_wanderer
|
||||||
|
kz_kzro_roscbhop
|
||||||
|
kz_kzro_winter
|
||||||
|
kz_kzsca_bhopindustry
|
||||||
|
kz_kzsca_escape
|
||||||
|
kz_kzsca_still
|
||||||
|
kz_kzse_dustbhop_h
|
||||||
|
kz_kzse_toonworld
|
||||||
|
kz_longjumps2
|
||||||
|
kz_man_bhopsnow
|
||||||
|
kz_man_neighbourhood
|
||||||
|
kz_megabhop_hard
|
||||||
|
kz_nix
|
||||||
|
kz_nobkz_factoryrun
|
||||||
|
kz_owensvalley
|
||||||
|
kz_pacman
|
||||||
|
kz_radium
|
||||||
|
kz_rd_oldmine
|
||||||
|
kz_satomi
|
||||||
|
kz_shrubhop_ez
|
||||||
|
kz_shrubhop_h
|
||||||
|
kz_starwars_deeja
|
||||||
|
kz_synergy
|
||||||
|
kz_synergy_x
|
||||||
|
kz_synergy_x2
|
||||||
|
kz_tkz_desertbl00ks
|
||||||
|
kz_undergroundvillage
|
||||||
|
kz_waterplant
|
||||||
|
kz_wild
|
||||||
|
kz_world
|
||||||
|
kz_xj_communitybhop
|
||||||
|
kzarg_bhopcircuit
|
||||||
|
kzarg_cellhop
|
||||||
|
kzarg_ih_sandhop
|
||||||
|
kzarg_lostrome
|
||||||
|
kzblt_dx_blueshadow2
|
||||||
|
kzblt_dx_mercy
|
||||||
|
kzbr_hii_cartoonbhop
|
||||||
|
kzcn_2012
|
||||||
|
kzdk_explorer_x
|
||||||
|
kzeed_bhop_madness
|
||||||
|
kzeed_prohop
|
||||||
|
kzex_darksiders
|
||||||
|
kzex_earthruins
|
||||||
|
kzla_cdbanana
|
||||||
|
kzls_bhop_china
|
||||||
|
kzls_kodash
|
||||||
|
kzls_smile
|
||||||
|
kzlt_arabhop
|
||||||
|
kzlt_dark_vault
|
||||||
|
kzm_cityhops
|
||||||
|
kzpf_deathless_x
|
||||||
|
kzr_greybhop
|
||||||
|
kzra_bhopmemories
|
||||||
|
kzra_crystal_palace
|
||||||
|
kzra_greencave
|
||||||
|
kzra_somecaves
|
||||||
|
kzra_stonebhop
|
||||||
|
kzra_stonebhop2
|
||||||
|
kzra_stoneishbhop
|
||||||
|
kzra_worlds
|
||||||
|
kzray_rocky-bhop
|
||||||
|
kzro_bhopbl0ck
|
||||||
|
kzro_brickybhop
|
||||||
|
kzro_excitedbhop
|
||||||
|
kzro_gohome
|
||||||
|
kzro_island
|
||||||
|
kzro_jaashsbhop
|
||||||
|
kzro_mountainbhop
|
||||||
|
kzro_tits
|
||||||
|
kzru_Mam6ahop
|
||||||
|
kzru_spacehop
|
||||||
|
kzru_technology_x
|
||||||
|
kzsca_bagdad
|
||||||
|
kzsca_burrow
|
||||||
|
kzsca_heaven
|
||||||
|
kzsca_snakebhop
|
||||||
|
kzsca_watertemple
|
||||||
|
kzsca_watertemple2
|
||||||
|
kzse_bhopblock
|
||||||
|
kzsk_cubeblock
|
||||||
|
kzsk_rocksland
|
||||||
|
kztw_abyss_2014
|
||||||
|
kzua_de_portal
|
||||||
|
kzua_goldbhop_x
|
||||||
|
kzua_mk_illumina
|
||||||
|
kzua_mk_illumina_h
|
||||||
|
kzua_zp_cellaregypt
|
||||||
|
kzua_zp_godroom_h
|
||||||
|
kzua_zp_hamunaptra_x
|
||||||
|
kzy_juhxbhop
|
||||||
|
kzz_bhop
|
||||||
|
ladder_0logic
|
||||||
|
mad_bhopit
|
||||||
|
mad_tomb
|
||||||
|
mad_tomb2
|
||||||
|
mck_vudu
|
||||||
|
mh_bhopljs_h
|
||||||
|
ml_monsterbhop
|
||||||
|
mls_floppytown_bh
|
||||||
|
mls_greenstyle_bh
|
||||||
|
mls_icefall_bhop
|
||||||
|
mls_stairsbhop
|
||||||
|
mto_bhops
|
||||||
|
nobkz_minimal
|
||||||
|
nobkz_mst_honduras_h
|
||||||
|
notkz_amazing
|
||||||
|
notkz_bhopcolour
|
||||||
|
nz_playstation
|
||||||
|
pixelhop
|
||||||
|
pprn_violetta_x
|
||||||
|
pro_kzcn_blow2
|
||||||
|
prochallenge_bhop
|
||||||
|
py_mix
|
||||||
|
qsk_azure
|
||||||
|
qsk_still
|
||||||
|
radon_desertpassage
|
||||||
|
rd_jump_house
|
||||||
|
risk_bhop_bunny
|
||||||
|
risk_sector
|
||||||
|
risk_snowcastle
|
||||||
|
rkz_easy_bhop_cross_runner
|
||||||
|
rr_inside^outside
|
||||||
|
rush_adventure
|
||||||
|
rush_countless
|
||||||
|
rvp_tundra-bhop
|
||||||
|
slD_bside_nightblock
|
||||||
|
smk_evergreen
|
||||||
|
smk_factory
|
||||||
|
smk_kzsca_factory
|
||||||
|
sn_dustown
|
||||||
|
sn_ezycity
|
||||||
|
speed_ytt_castle
|
||||||
|
stf_creepytemple
|
||||||
|
ugly_stairstoon
|
||||||
|
ytt_light_stars
|
||||||
|
ytt_wow_mix
|
26
amxmodx/configs/miscstats.ini
Normal file
26
amxmodx/configs/miscstats.ini
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
; To disable a sound, disable it from amxmodmenu (stats settings) or from command amx_statscfgmenu
|
||||||
|
; Sound name length mustn't exceed 54 characters (without sound/ and without .wav extension)
|
||||||
|
; Otherwise plugin won't take it in account because fast download wouldn't be supported
|
||||||
|
|
||||||
|
FirstBloodSound misc/firstblood
|
||||||
|
LastManVsOthersSound misc/oneandonly
|
||||||
|
LastManDuelSound misc/maytheforce
|
||||||
|
HeadShotKillSoundKiller misc/headshot
|
||||||
|
HeadShotKillSoundVictim fvox/flatline
|
||||||
|
KnifeKillSound misc/humiliation
|
||||||
|
DoubleKillSound misc/doublekill
|
||||||
|
RoundCounterSound misc/prepare
|
||||||
|
GrenadeKillSound djeyl/grenade
|
||||||
|
GrenadeSuicideSound djeyl/witch
|
||||||
|
BombPlantedSound djeyl/c4powa
|
||||||
|
BombDefusedSound djeyl/laugh
|
||||||
|
BombFailedSound djeyl/witch
|
||||||
|
|
||||||
|
; KillingStreak and MultiKill Sounds
|
||||||
|
MultiKillSound misc/multikill
|
||||||
|
UltraKillSound misc/ultrakill
|
||||||
|
KillingSpreeSound misc/killingspree
|
||||||
|
RampageSound misc/rampage
|
||||||
|
UnstopableSound misc/unstoppable
|
||||||
|
MonsterKillSound misc/monsterkill
|
||||||
|
GodLike misc/godlike
|
41
amxmodx/configs/modules.ini
Executable file
41
amxmodx/configs/modules.ini
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
|
||||||
|
;;;
|
||||||
|
; To enable a module, remove the semi-colon (;) in front of its name.
|
||||||
|
; If it's not here, simply add it its name, one per line.
|
||||||
|
; You don't need to write the _amxx part or the file extension.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; SQL Modules usually need to be enabled manually ;;
|
||||||
|
;; You can have any number on at a time. Use ;;
|
||||||
|
;; amx_sql_type in sql.cfg to specify the default ;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
mysql
|
||||||
|
;sqlite
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Put third party modules below here. ;;
|
||||||
|
;; You can just list their names, without the _amxx ;;
|
||||||
|
;; or file extension. ;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
;curl
|
||||||
|
amxxarch
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; These modules will be auto-detected and loaded ;;
|
||||||
|
;; as needed. You do not need to enable them here ;;
|
||||||
|
;; unless you have problems. ;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
;fun
|
||||||
|
;engine
|
||||||
|
;fakemeta
|
||||||
|
;geoip
|
||||||
|
;sockets
|
||||||
|
;regex
|
||||||
|
;nvault
|
||||||
|
;cstrike
|
||||||
|
;csx
|
||||||
|
;hamsandwich
|
17
amxmodx/configs/mpbhop.cfg
Normal file
17
amxmodx/configs/mpbhop.cfg
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
// "MultiPlayer Bhop" configuration file
|
||||||
|
// Author : "ConnorMcLeod"
|
||||||
|
// Version : "1.1.2"
|
||||||
|
// File : "mpbhop.amxx"
|
||||||
|
|
||||||
|
// Console Commands :
|
||||||
|
// kz_mpbhop | Access:"h" | "<0/1> set blocks so they can't move when players touch them"
|
||||||
|
// kz_mpbhop_entitytouch | Access:"h" | "<0/1> set blocks so they can't move when other entities than players touch them"
|
||||||
|
// kz_mpbhopmenu | Access:"h" | ""
|
||||||
|
// kz_safe_inform | Access:"h" | "<0/1> Inform recorders that their demo will be safe or not safe according to plugin state"
|
||||||
|
// kz_showblocks | Access:"h" | ""
|
||||||
|
|
||||||
|
// Cvars :
|
||||||
|
// mp_bhop_version "1.1.2"
|
||||||
|
|
||||||
|
kz_mpbhop 1
|
||||||
|
kz_mpbhop_entitytouch 1
|
2
amxmodx/configs/mpbhop/BKZ_Primitive.dat
Normal file
2
amxmodx/configs/mpbhop/BKZ_Primitive.dat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
-2943.999999 1687.999999 -255.999999 1
|
||||||
|
-695.999999 2015.999999 -295.999999 1
|
9
amxmodx/configs/mpbhop/bhop_celsbrick.dat
Normal file
9
amxmodx/configs/mpbhop/bhop_celsbrick.dat
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
727.999999 1719.999999 -1175.999999 1
|
||||||
|
663.999999 1671.999999 -1175.999999 1
|
||||||
|
1535.999999 455.999999 -1207.999999 1
|
||||||
|
1479.999999 503.999999 -1207.999999 1
|
||||||
|
-511.999999 -80.000000 -1223.999999 1
|
||||||
|
-527.999999 -167.999999 -1215.999999 1
|
||||||
|
-551.999999 -255.999999 -1207.999999 1
|
||||||
|
-583.999999 -343.999999 -1199.999999 1
|
||||||
|
-623.999999 -431.999999 -1191.999999 1
|
2
amxmodx/configs/mpbhop/bhop_hard.dat
Normal file
2
amxmodx/configs/mpbhop/bhop_hard.dat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
927.999999 -351.999999 -383.999999 1
|
||||||
|
863.999999 -223.999999 -383.999999 1
|
18
amxmodx/configs/mpbhop/bhopkz_raz.dat
Normal file
18
amxmodx/configs/mpbhop/bhopkz_raz.dat
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
1087.999999 -239.999999 -311.999999 1
|
||||||
|
1471.999999 -239.999999 -311.999999 1
|
||||||
|
1087.999999 -479.999999 -311.999999 1
|
||||||
|
1087.999999 -703.999999 -311.999999 1
|
||||||
|
1087.999999 -1215.999999 -311.999999 1
|
||||||
|
1087.999999 -991.999999 -311.999999 1
|
||||||
|
1471.999999 -479.999999 -311.999999 1
|
||||||
|
1471.999999 -703.999999 -311.999999 1
|
||||||
|
1471.999999 -991.999999 -311.999999 1
|
||||||
|
1471.999999 -1215.999999 -311.999999 1
|
||||||
|
1375.999999 -1103.999999 -311.999999 1
|
||||||
|
1183.999999 -1103.999999 -311.999999 1
|
||||||
|
1183.999999 -575.999999 -311.999999 1
|
||||||
|
1375.999999 -575.999999 -311.999999 1
|
||||||
|
1183.999999 -351.999999 -311.999999 1
|
||||||
|
1375.999999 -351.999999 -311.999999 1
|
||||||
|
1183.999999 -119.999999 -311.999999 1
|
||||||
|
1375.999999 -119.999999 -311.999999 1
|
7
amxmodx/configs/mpbhop/bn_tombbhop.dat
Normal file
7
amxmodx/configs/mpbhop/bn_tombbhop.dat
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
-119.999999 -1863.999999 -507.499999 1
|
||||||
|
-295.999999 -1927.999999 -508.499999 1
|
||||||
|
-567.999999 -1799.999999 -508.499999 1
|
||||||
|
-951.999999 -1767.999999 -508.499999 1
|
||||||
|
-1031.999999 -1623.999999 -508.499999 1
|
||||||
|
-1063.999999 -1239.999999 -508.499999 1
|
||||||
|
-1031.999999 -1031.999999 -508.499999 1
|
18
amxmodx/configs/mpbhop/bz_sand.dat
Normal file
18
amxmodx/configs/mpbhop/bz_sand.dat
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
3167.999999 2503.999999 -135.999999 1
|
||||||
|
2783.999999 2631.999999 -111.999999 1
|
||||||
|
2783.999999 2719.999999 -87.999999 1
|
||||||
|
3167.999999 2855.999999 -135.999999 1
|
||||||
|
3711.999999 2439.999999 -31.999999 1
|
||||||
|
3711.999999 2311.999999 -71.999999 1
|
||||||
|
3711.999999 2207.999999 -40.000000 1
|
||||||
|
3359.999999 1895.999999 -55.999999 1
|
||||||
|
3359.999999 1791.999999 -40.000000 1
|
||||||
|
3359.999999 1687.999999 -23.999999 1
|
||||||
|
3335.999999 1055.999999 183.999999 1
|
||||||
|
3399.999999 1055.999999 167.999999 1
|
||||||
|
3463.999999 1055.999999 151.999999 1
|
||||||
|
3527.999999 1055.999999 135.999999 1
|
||||||
|
2807.999999 2071.999999 -227.999999 1
|
||||||
|
2887.999999 1983.999999 -203.999999 1
|
||||||
|
2939.999999 2307.999999 -223.999999 1
|
||||||
|
3073.999999 2305.999999 -211.999999 1
|
5
amxmodx/configs/mpbhop/cg_cbblebhop.dat
Normal file
5
amxmodx/configs/mpbhop/cg_cbblebhop.dat
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
523.499999 233.499999 -43.999999 1
|
||||||
|
245.499999 324.499999 -43.999999 1
|
||||||
|
245.499999 139.499999 -43.999999 1
|
||||||
|
-178.499999 324.499999 -43.999999 1
|
||||||
|
-178.499999 139.499999 -43.999999 1
|
2
amxmodx/configs/mpbhop/drh_bhop_dust2.dat
Normal file
2
amxmodx/configs/mpbhop/drh_bhop_dust2.dat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
-235.999999 -1095.999999 -75.499999 1
|
||||||
|
375.999999 171.999999 -67.999999 1
|
8
amxmodx/configs/mpbhop/kz_kzdk_droughthop.dat
Normal file
8
amxmodx/configs/mpbhop/kz_kzdk_droughthop.dat
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
1661.499999 2032.999999 1197.999999 1
|
||||||
|
1774.499999 2176.499999 1197.999999 1
|
||||||
|
655.499999 -3605.999999 1187.999999 1
|
||||||
|
729.499999 -3437.999999 1193.999999 1
|
||||||
|
644.499999 -3217.999999 1223.999999 1
|
||||||
|
540.499999 -3144.999999 1223.999999 1
|
||||||
|
435.999999 -1830.999999 1188.499999 1
|
||||||
|
435.999999 -1712.999999 1188.499999 1
|
1
amxmodx/configs/mpbhop/kz_kzsca_sewerbhop.dat
Normal file
1
amxmodx/configs/mpbhop/kz_kzsca_sewerbhop.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
-1399.999999 1207.999999 1599.999999 1
|
1
amxmodx/configs/mpbhop/kz_longjumps2.dat
Normal file
1
amxmodx/configs/mpbhop/kz_longjumps2.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
-1111.999999 1103.999999 -2663.999999 1
|
2
amxmodx/configs/mpbhop/kz_megabhop.dat
Normal file
2
amxmodx/configs/mpbhop/kz_megabhop.dat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
427.999999 2323.999999 -959.999999 0
|
||||||
|
-991.999999 1471.999999 -967.999999 0
|
2
amxmodx/configs/mpbhop/kz_megabhop_hard.dat
Normal file
2
amxmodx/configs/mpbhop/kz_megabhop_hard.dat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
427.999999 2323.999999 -959.999999 0
|
||||||
|
-991.999999 1471.999999 -967.999999 0
|
2
amxmodx/configs/mpbhop/kzblt_zigzaghop.dat
Normal file
2
amxmodx/configs/mpbhop/kzblt_zigzaghop.dat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
1271.999999 15.999999 -103.999999 1
|
||||||
|
1271.999999 -87.999999 -103.999999 1
|
1
amxmodx/configs/mpbhop/kzlt_castlehops.dat
Normal file
1
amxmodx/configs/mpbhop/kzlt_castlehops.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
-575.999999 -695.999999 -247.999999 1
|
19
amxmodx/configs/mpbhop/kzlv_vaz_ujo_e.dat
Normal file
19
amxmodx/configs/mpbhop/kzlv_vaz_ujo_e.dat
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
42.499999 335.499999 -552.499999 1
|
||||||
|
164.499999 335.499999 -552.499999 1
|
||||||
|
528.499999 526.499999 -552.499999 1
|
||||||
|
528.499999 683.499999 -552.499999 1
|
||||||
|
199.499999 370.499999 -552.499999 1
|
||||||
|
199.499999 526.499999 -552.499999 1
|
||||||
|
199.499999 683.499999 -552.499999 1
|
||||||
|
466.499999 745.499999 -552.499999 1
|
||||||
|
260.999999 744.499999 -552.499999 1
|
||||||
|
662.499999 838.499999 -552.499999 1
|
||||||
|
662.499999 681.999999 -552.499999 1
|
||||||
|
662.499999 524.999999 -552.499999 1
|
||||||
|
65.499999 524.999999 -552.499999 1
|
||||||
|
65.499999 681.999999 -552.499999 1
|
||||||
|
65.499999 838.499999 -552.499999 1
|
||||||
|
208.499999 840.499999 -554.499999 1
|
||||||
|
364.499999 840.499999 -554.499999 1
|
||||||
|
521.499999 840.499999 -554.499999 1
|
||||||
|
-235.999999 260.999999 -483.999999 1
|
19
amxmodx/configs/mpbhop/kzlv_vaz_ujo_h.dat
Normal file
19
amxmodx/configs/mpbhop/kzlv_vaz_ujo_h.dat
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
42.499999 335.499999 -552.499999 1
|
||||||
|
164.499999 335.499999 -552.499999 1
|
||||||
|
528.499999 526.499999 -552.499999 1
|
||||||
|
528.499999 683.499999 -552.499999 1
|
||||||
|
199.499999 370.499999 -552.499999 1
|
||||||
|
199.499999 526.499999 -552.499999 1
|
||||||
|
199.499999 683.499999 -552.499999 1
|
||||||
|
466.499999 745.499999 -552.499999 1
|
||||||
|
260.999999 744.499999 -552.499999 1
|
||||||
|
662.499999 838.499999 -552.499999 1
|
||||||
|
662.499999 681.999999 -552.499999 1
|
||||||
|
662.499999 524.999999 -552.499999 1
|
||||||
|
65.499999 524.999999 -552.499999 1
|
||||||
|
65.499999 681.999999 -552.499999 1
|
||||||
|
65.499999 838.499999 -552.499999 1
|
||||||
|
208.499999 840.499999 -554.499999 1
|
||||||
|
364.499999 840.499999 -554.499999 1
|
||||||
|
521.499999 840.499999 -554.499999 1
|
||||||
|
-235.999999 260.999999 -483.999999 1
|
3
amxmodx/configs/mpbhop/kzm_cityhops.dat
Normal file
3
amxmodx/configs/mpbhop/kzm_cityhops.dat
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
200.000000 300.000000 -495.999999 1
|
||||||
|
891.999999 3735.999999 177.999999 1
|
||||||
|
731.999999 3647.999999 111.999999 1
|
20
amxmodx/configs/mpbhop/kzru_pharaonrun.dat
Normal file
20
amxmodx/configs/mpbhop/kzru_pharaonrun.dat
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
-23.999999 -31.999999 -63.999999 1
|
||||||
|
-159.999999 95.999999 -63.999999 1
|
||||||
|
8.000000 159.999999 -63.999999 1
|
||||||
|
8.000000 351.999999 -63.999999 1
|
||||||
|
-143.999999 415.999999 -63.999999 1
|
||||||
|
8.000000 527.999999 -63.999999 1
|
||||||
|
-175.999999 623.999999 -63.999999 1
|
||||||
|
-23.999999 719.999999 -63.999999 1
|
||||||
|
-127.999999 863.999999 -63.999999 1
|
||||||
|
95.999999 1055.999999 -63.999999 1
|
||||||
|
543.999999 927.999999 -63.999999 1
|
||||||
|
415.999999 800.000000 -63.999999 1
|
||||||
|
335.999999 671.999999 -63.999999 1
|
||||||
|
479.999999 575.999999 -63.999999 1
|
||||||
|
575.999999 447.999999 -63.999999 1
|
||||||
|
415.999999 351.999999 -63.999999 1
|
||||||
|
543.999999 223.999999 -63.999999 1
|
||||||
|
383.999999 127.999999 -63.999999 1
|
||||||
|
527.999999 0.000000 -63.999999 1
|
||||||
|
287.999999 1055.999999 -63.999999 1
|
1
amxmodx/configs/mpbhop/kzse_ancienthopez.dat
Normal file
1
amxmodx/configs/mpbhop/kzse_ancienthopez.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
-231.999999 2189.999999 77.999999 1
|
1
amxmodx/configs/mpbhop/ms_rockbhop.dat
Normal file
1
amxmodx/configs/mpbhop/ms_rockbhop.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
327.999999 -23.999999 -74.499999 1
|
1
amxmodx/configs/mpbhop/mtd_mariobhop.dat
Normal file
1
amxmodx/configs/mpbhop/mtd_mariobhop.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
-4.000000 -553.499999 -1378.999999 1
|
1
amxmodx/configs/mpbhop/notkz_bhopcolour.dat
Normal file
1
amxmodx/configs/mpbhop/notkz_bhopcolour.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
759.999999 -279.999999 -1095.999999 1
|
56
amxmodx/configs/mpbhop/notkz_ceylanhop.dat
Normal file
56
amxmodx/configs/mpbhop/notkz_ceylanhop.dat
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
655.999999 351.999999 -271.999999 1
|
||||||
|
719.999999 463.999999 -271.999999 1
|
||||||
|
591.999999 543.999999 -271.999999 1
|
||||||
|
591.999999 687.999999 -271.999999 1
|
||||||
|
447.999999 719.999999 -271.999999 1
|
||||||
|
255.999999 1119.999999 -271.999999 1
|
||||||
|
400.000000 1183.999999 -271.999999 1
|
||||||
|
527.999999 1119.999999 -271.999999 1
|
||||||
|
655.999999 1247.999999 -271.999999 1
|
||||||
|
591.999999 1359.999999 -271.999999 1
|
||||||
|
495.999999 1439.999999 -271.999999 1
|
||||||
|
559.999999 1583.999999 -271.999999 1
|
||||||
|
719.999999 1583.999999 -271.999999 1
|
||||||
|
2879.999999 1375.999999 -279.999999 1
|
||||||
|
3007.999999 1247.999999 -279.999999 1
|
||||||
|
2639.999999 1039.999999 -279.999999 1
|
||||||
|
2527.999999 1263.999999 -287.999999 1
|
||||||
|
2415.999999 1359.999999 -287.999999 1
|
||||||
|
2255.999999 1359.999999 -287.999999 1
|
||||||
|
2175.999999 1215.999999 -287.999999 1
|
||||||
|
2047.999999 1055.999999 -255.999999 1
|
||||||
|
2000.000000 911.999999 -271.999999 1
|
||||||
|
2591.999999 1151.999999 -287.999999 1
|
||||||
|
2943.999999 1535.999999 -279.999999 1
|
||||||
|
2959.999999 2447.999999 -271.999999 1
|
||||||
|
2815.999999 2591.999999 -271.999999 1
|
||||||
|
2703.999999 2559.999999 -271.999999 1
|
||||||
|
2559.999999 2559.999999 -271.999999 1
|
||||||
|
2463.999999 2671.999999 -271.999999 1
|
||||||
|
2287.999999 2671.999999 -271.999999 1
|
||||||
|
2831.999999 1631.999999 -279.999999 1
|
||||||
|
2319.999999 3055.999999 -255.999999 1
|
||||||
|
2415.999999 3151.999999 -255.999999 1
|
||||||
|
2575.999999 3119.999999 -239.999999 1
|
||||||
|
2735.999999 3199.999999 -271.999999 1
|
||||||
|
2863.999999 3087.999999 -271.999999 1
|
||||||
|
3007.999999 3167.999999 -271.999999 1
|
||||||
|
143.999999 2959.999999 -279.999999 1
|
||||||
|
-47.999999 2975.999999 -279.999999 1
|
||||||
|
-159.999999 2895.999999 -279.999999 1
|
||||||
|
-319.999999 2911.999999 -279.999999 1
|
||||||
|
-800.000000 2863.999999 -279.999999 1
|
||||||
|
-927.999999 2943.999999 -271.999999 1
|
||||||
|
-927.999999 3087.999999 -263.999999 1
|
||||||
|
-1071.999999 3135.999999 -255.999999 1
|
||||||
|
-1279.999999 3103.999999 -279.999999 1
|
||||||
|
-1343.999999 2943.999999 -279.999999 1
|
||||||
|
2543.999999 -1311.999999 -800.000000 1
|
||||||
|
1599.999999 -1327.999999 -800.000000 1
|
||||||
|
1663.999999 -1487.999999 -800.000000 1
|
||||||
|
1823.999999 -1551.999999 -800.000000 1
|
||||||
|
607.999999 -1407.999999 -759.999999 1
|
||||||
|
415.999999 -1407.999999 -767.999999 1
|
||||||
|
351.999999 -1567.999999 -767.999999 1
|
||||||
|
431.999999 -1695.999999 -759.999999 1
|
||||||
|
351.999999 -1839.999999 -767.999999 1
|
1
amxmodx/configs/mpbhop/notkz_ml_bhop_3ways.dat
Normal file
1
amxmodx/configs/mpbhop/notkz_ml_bhop_3ways.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1563.999999 1467.999999 55.999999 0
|
4
amxmodx/configs/mpbhop/notkz_straighthops_beta_v1.dat
Normal file
4
amxmodx/configs/mpbhop/notkz_straighthops_beta_v1.dat
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
-1215.999999 -1327.999999 -255.999999 1
|
||||||
|
1175.999999 -1047.999999 -255.999999 1
|
||||||
|
1175.999999 -1143.999999 -255.999999 1
|
||||||
|
1175.999999 -1239.999999 -255.999999 1
|
1
amxmodx/configs/mpbhop/oHS_bhop_hell.dat
Normal file
1
amxmodx/configs/mpbhop/oHS_bhop_hell.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1063.999999 -1239.999999 -319.499999 1
|
1
amxmodx/configs/mpbhop/risk_sector.dat
Normal file
1
amxmodx/configs/mpbhop/risk_sector.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
543.999999 -2543.999999 -47.999999 1
|
1
amxmodx/configs/mpbhop/xjbg_climbhop.dat
Normal file
1
amxmodx/configs/mpbhop/xjbg_climbhop.dat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
159.999999 -497.999999 147.999999 1
|
2
amxmodx/configs/pausecfg.ini
Normal file
2
amxmodx/configs/pausecfg.ini
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
;Generated by Pause Plugins Plugin. Do not modify!
|
||||||
|
;Title Filename
|
54
amxmodx/configs/plugins.ini
Executable file
54
amxmodx/configs/plugins.ini
Executable file
|
@ -0,0 +1,54 @@
|
||||||
|
; AMX Mod X plugins
|
||||||
|
|
||||||
|
; Admin Base - Always one has to be activated
|
||||||
|
;admin.amxx ; admin base (required for any admin-related)
|
||||||
|
admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
|
||||||
|
|
||||||
|
; Basic
|
||||||
|
admincmd.amxx ; basic admin console commands
|
||||||
|
adminhelp.amxx ; help command for admin console commands
|
||||||
|
adminslots.amxx ; slot reservation
|
||||||
|
multilingual.amxx ; Multi-Lingual management
|
||||||
|
|
||||||
|
; Menus
|
||||||
|
menufront.amxx ; front-end for admin menus
|
||||||
|
cmdmenu.amxx ; command menu (speech, settings)
|
||||||
|
plmenu.amxx ; players menu (kick, ban, client cmds.)
|
||||||
|
telemenu.amxx ; teleport menu (Fun Module required!)
|
||||||
|
mapsmenu.amxx ; maps menu (vote, changelevel)
|
||||||
|
pluginmenu.amxx ; Menus for commands/cvars organized by plugin
|
||||||
|
|
||||||
|
; Chat / Messages
|
||||||
|
adminchat.amxx ; console chat commands
|
||||||
|
antiflood.amxx ; prevent clients from chat-flooding the server
|
||||||
|
scrollmsg.amxx ; displays a scrolling message
|
||||||
|
imessage.amxx ; displays information messages
|
||||||
|
adminvote.amxx ; vote commands
|
||||||
|
|
||||||
|
; Map related
|
||||||
|
;nextmap.amxx ; displays next map in mapcycle
|
||||||
|
;mapchooser.amxx ; allows to vote for next map
|
||||||
|
rtv.amxx
|
||||||
|
;timeleft.amxx ; displays time left on map
|
||||||
|
|
||||||
|
; Configuration
|
||||||
|
pausecfg.amxx ; allows to pause and unpause some plugins
|
||||||
|
;statscfg.amxx ; allows to manage stats plugins via menu and commands
|
||||||
|
|
||||||
|
; Counter-Strike
|
||||||
|
;restmenu.amxx ; restrict weapons menu
|
||||||
|
;statsx.amxx ; stats on death or round end (CSX Module required!)
|
||||||
|
;miscstats.amxx ; bunch of events announcement for Counter-Strike
|
||||||
|
;stats_logging.amxx ; weapons stats logging (CSX Module required!)
|
||||||
|
|
||||||
|
; Custom - Add 3rd party plugins here
|
||||||
|
sys_timing.amxx
|
||||||
|
|
||||||
|
uq_jumpstats.amxx
|
||||||
|
uq_jumpstats_tops.amxx
|
||||||
|
|
||||||
|
KZ_Engine.amxx
|
||||||
|
KZ_Chat.amxx
|
||||||
|
KZ_Bot.amxx
|
||||||
|
|
||||||
|
mpbhop.amxx
|
34
amxmodx/configs/speech.ini
Executable file
34
amxmodx/configs/speech.ini
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
; Menu configuration file
|
||||||
|
; File location: $moddir/addons/amxmodx/configs/speech.ini
|
||||||
|
; To use with Commands Menu plugin
|
||||||
|
|
||||||
|
; NOTE: By default in all settings the access level is set to "u".
|
||||||
|
; However you can change that, to limit the access to some settings.
|
||||||
|
|
||||||
|
; Commands Menu: ; < description > < command > < flags > < access level >
|
||||||
|
; "a" - execute from server console
|
||||||
|
; "b" - execute from admin console
|
||||||
|
; "c" - execute on all clients
|
||||||
|
; "d" - back to menu when executed
|
||||||
|
|
||||||
|
"Hello!" "spk \'vox/hello\'" "cd" "u"
|
||||||
|
"Don't think so" "spk \'barney/dontguess\'" "cd" "u"
|
||||||
|
"Don't ask me" "spk \'barney/dontaskme\'" "cd" "u"
|
||||||
|
"Hey! Stop that!" "spk \'barney/donthurtem\'" "cd" "u"
|
||||||
|
"Yup" "spk \'barney/yup\'" "cd" "u"
|
||||||
|
"Nope" "spk \'barney/nope\'" "cd" "u"
|
||||||
|
"Maybe" "spk \'barney/maybe\'" "cd" "u"
|
||||||
|
"Seeya" "spk \'barney/seeya\'" "cd" "u"
|
||||||
|
"Man that sounded bad" "spk \'barney/soundsbad\'" "cd" "u"
|
||||||
|
"Hello and die" "spk \'vox/hello and die\'" "cd" "u"
|
||||||
|
"Move!" "spk \'hgrunt/move! _comma yessir!\'" "cd" "u"
|
||||||
|
"You will definitely pay!" "spk \'hgrunt/c2a2_hg_chat5a\'" "cd" "u"
|
||||||
|
"Laughter" "spk \'hgrunt/c2a3_hg_laugh\'" "cd" "u"
|
||||||
|
"Silence!" "spk \'hgrunt/silence!\'" "cd" "u"
|
||||||
|
"You talk too much" "spk \'barney/youtalkmuch\'" "cd" "u"
|
||||||
|
"You thinkin?" "spk \'barney/thinking\'" "cd" "u"
|
||||||
|
"Open fire Gordon!" "spk \'barney/openfire\'" "cd" "u"
|
||||||
|
"Couldnt make a bigger mess" "spk \'barney/bigmess\'" "cd" "u"
|
||||||
|
"I have a Bad feeling" "spk \'barney/badfeeling\'" "cd" "u"
|
||||||
|
"Yes sir!" "spk \'hgrunt/yessir!\'" "cd" "u"
|
||||||
|
"No sir" "spk \'barney/nosir\'" "cd" "u"
|
8
amxmodx/configs/stats.ini
Executable file
8
amxmodx/configs/stats.ini
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
;Generated by Stats Configuration Plugin. Do not modify!
|
||||||
|
;Variable Description
|
||||||
|
ShowAttackers ;Show Attackers
|
||||||
|
ShowVictims ;Show Victims
|
||||||
|
ShowStats ;HUD-stats default
|
||||||
|
SayRankStats ;Say /rankstats
|
||||||
|
SayRank ;Say /rank
|
||||||
|
SayTop15 ;Say /top15
|
261
amxmodx/configs/uqjumpstats.cfg
Normal file
261
amxmodx/configs/uqjumpstats.cfg
Normal file
|
@ -0,0 +1,261 @@
|
||||||
|
// Mysql Connect
|
||||||
|
kz_uq_host = 127.0.0.1
|
||||||
|
kz_uq_user = kreedz
|
||||||
|
kz_uq_pass = AQZbQN6TnttcSZVKQCKVX
|
||||||
|
kz_uq_db = kreedz
|
||||||
|
|
||||||
|
// 0 = none
|
||||||
|
// a = colorchat
|
||||||
|
// b = stats
|
||||||
|
// c = speed
|
||||||
|
// d = showpre
|
||||||
|
// e = strafe stats
|
||||||
|
// f = beam
|
||||||
|
// g = duck stats for mcj
|
||||||
|
// h = shows message when your bhop prestrafe is failed
|
||||||
|
// i = show multibhop pre
|
||||||
|
// j = show prestrafe after duck
|
||||||
|
// k = show lj prestrafe
|
||||||
|
// l = show edge
|
||||||
|
// m = show edge when fail (without block)
|
||||||
|
// n = on/off sound's on players
|
||||||
|
kz_uq_connect "abdeghijklmno"
|
||||||
|
|
||||||
|
kz_uq_bots "1"
|
||||||
|
|
||||||
|
// Min distance
|
||||||
|
kz_uq_min_dist 215
|
||||||
|
|
||||||
|
// Min distance (Ups bhop, MultiBhop, Real Ladder Bhop, Ducks Bhop, Ladder Jump)
|
||||||
|
kz_uq_min_dist_other 150
|
||||||
|
|
||||||
|
// Max distance
|
||||||
|
kz_uq_max_dist 290
|
||||||
|
|
||||||
|
// Allow sounds (1 = on, 0 = off)
|
||||||
|
kz_uq_sounds 1
|
||||||
|
|
||||||
|
// Allow check to legal settings (1 = on, 0 = off)
|
||||||
|
kz_uq_legal_settings 1
|
||||||
|
kz_uq_fps 1
|
||||||
|
kz_uq_bug_check 1
|
||||||
|
kz_uq_script_detection 1
|
||||||
|
|
||||||
|
// Allow InGame Strafe Stats (laggy feature)
|
||||||
|
kz_uq_istrafes 0
|
||||||
|
|
||||||
|
// How to set up a server by value sv_airaccelerate (0=10aa, 1=100aa)
|
||||||
|
kz_uq_airaccelerate 1
|
||||||
|
|
||||||
|
kz_uq_noslowdown 0
|
||||||
|
|
||||||
|
// Max strafes (if players strafes>Max, stats doesnt shows)
|
||||||
|
kz_uq_max_strafes 14
|
||||||
|
|
||||||
|
// Color Hud message statistics when you jump, in the RGB
|
||||||
|
kz_uq_stats_red 50
|
||||||
|
kz_uq_stats_green 189
|
||||||
|
kz_uq_stats_blue 100
|
||||||
|
|
||||||
|
// Color Hud messages Fail statistics when you jump, in the RGB
|
||||||
|
kz_uq_failstats_red 238
|
||||||
|
kz_uq_failstats_green 0
|
||||||
|
kz_uq_failstats_blue 0
|
||||||
|
|
||||||
|
// Color Hud messages prestrafe, in the RGB
|
||||||
|
kz_uq_prestrafe_red 30
|
||||||
|
kz_uq_prestrafe_green 255
|
||||||
|
kz_uq_prestrafe_blue 255
|
||||||
|
|
||||||
|
// Color of speed, in the RGB
|
||||||
|
kz_uq_speed_red 255
|
||||||
|
kz_uq_speed_green 255
|
||||||
|
kz_uq_speed_blue 255
|
||||||
|
|
||||||
|
//Coordinates Hud messages
|
||||||
|
|
||||||
|
//General stats jump
|
||||||
|
kz_uq_stats_x "-1.0"
|
||||||
|
kz_uq_stats_y "0.70"
|
||||||
|
|
||||||
|
//Strafes Stats
|
||||||
|
kz_uq_strafe_x "0.70"
|
||||||
|
kz_uq_strafe_y "0.35"
|
||||||
|
|
||||||
|
//Ducks Stats for Multi dd
|
||||||
|
kz_uq_duck_x "0.6"
|
||||||
|
kz_uq_duck_y "0.78"
|
||||||
|
|
||||||
|
//Speed
|
||||||
|
kz_uq_speed_x "-1.0"
|
||||||
|
kz_uq_speed_y "0.83"
|
||||||
|
|
||||||
|
//Prestrafe
|
||||||
|
kz_uq_prestrafe_x "-1.0"
|
||||||
|
kz_uq_prestrafe_y "0.65"
|
||||||
|
|
||||||
|
// Channel Hud messages of general stats jump
|
||||||
|
kz_uq_hud_stats 3
|
||||||
|
|
||||||
|
// Channel Hud messages of strafes Stats
|
||||||
|
kz_uq_hud_strafe 2
|
||||||
|
|
||||||
|
// Channel Hud messages of ducks Stats for Multi CountJump
|
||||||
|
kz_uq_hud_duck 1
|
||||||
|
|
||||||
|
// Channel Hud messages of speed
|
||||||
|
kz_uq_hud_speed 2
|
||||||
|
|
||||||
|
// Channel Hud messages of prestafe
|
||||||
|
kz_uq_hud_pre 1
|
||||||
|
|
||||||
|
// For what technique stats enable
|
||||||
|
kz_uq_lj 1
|
||||||
|
kz_uq_cj 1
|
||||||
|
kz_uq_bj 1
|
||||||
|
kz_uq_sbj 1
|
||||||
|
kz_uq_wj 1
|
||||||
|
kz_uq_dcj 1
|
||||||
|
kz_uq_mcj 1
|
||||||
|
kz_uq_drbj 1
|
||||||
|
kz_uq_drcj 1
|
||||||
|
kz_uq_ladder 1
|
||||||
|
kz_uq_ldbj 1
|
||||||
|
|
||||||
|
// Max,Min block to show in edge
|
||||||
|
kz_uq_max_block 290
|
||||||
|
kz_uq_min_block 200
|
||||||
|
|
||||||
|
// Minimum Prestrafe to show
|
||||||
|
kz_uq_min_pre 60
|
||||||
|
|
||||||
|
// For what Extra technique stats enable
|
||||||
|
kz_uq_scj 1
|
||||||
|
kz_uq_dscj 1
|
||||||
|
kz_uq_mscj 1
|
||||||
|
kz_uq_dropscj 1
|
||||||
|
kz_uq_dropdscj 1
|
||||||
|
kz_uq_dropmscj 1
|
||||||
|
kz_uq_duckbhop 0
|
||||||
|
kz_uq_bhopinduck 1
|
||||||
|
kz_uq_realldbhop 1
|
||||||
|
kz_uq_upbj 1
|
||||||
|
kz_uq_upsbj 1
|
||||||
|
kz_uq_upbhopinduck 1
|
||||||
|
kz_uq_multibhop 0
|
||||||
|
kz_uq_dropdcj 1
|
||||||
|
kz_uq_dropmcj 1
|
||||||
|
|
||||||
|
// Color for chat messages of jump distances (good = grey, pro = green, holy = blue, leet = red, god = red (with sound godlike for all players))
|
||||||
|
// LongJump/HighJump
|
||||||
|
kz_uq_good_lj 240
|
||||||
|
kz_uq_pro_lj 245
|
||||||
|
kz_uq_holy_lj 250
|
||||||
|
kz_uq_leet_lj 252
|
||||||
|
kz_uq_god_lj 254
|
||||||
|
kz_uq_dom_lj 255
|
||||||
|
|
||||||
|
// CountJump
|
||||||
|
kz_uq_good_cj 250
|
||||||
|
kz_uq_pro_cj 255
|
||||||
|
kz_uq_holy_cj 260
|
||||||
|
kz_uq_leet_cj 263
|
||||||
|
kz_uq_god_cj 265
|
||||||
|
kz_uq_dom_cj 267
|
||||||
|
|
||||||
|
// Double CountJump/Multi CountJump
|
||||||
|
kz_uq_good_dcj 250
|
||||||
|
kz_uq_pro_dcj 255
|
||||||
|
kz_uq_holy_dcj 260
|
||||||
|
kz_uq_leet_dcj 265
|
||||||
|
kz_uq_god_dcj 268
|
||||||
|
kz_uq_dom_dcj 270
|
||||||
|
|
||||||
|
// LadderJump
|
||||||
|
kz_uq_good_ladder 150
|
||||||
|
kz_uq_pro_ladder 160
|
||||||
|
kz_uq_holy_ladder 170
|
||||||
|
kz_uq_leet_ladder 180
|
||||||
|
kz_uq_god_ladder 185
|
||||||
|
kz_uq_dom_ladder 190
|
||||||
|
|
||||||
|
// BhopJump/StandUp BhopJump
|
||||||
|
kz_uq_good_bj 230
|
||||||
|
kz_uq_pro_bj 235
|
||||||
|
kz_uq_holy_bj 240
|
||||||
|
kz_uq_leet_bj 243
|
||||||
|
kz_uq_god_bj 245
|
||||||
|
kz_uq_dom_bj 247
|
||||||
|
|
||||||
|
// WeirdJump/Drop CountJump(double,multi)/Ladder BhopJump
|
||||||
|
kz_uq_good_wj 250
|
||||||
|
kz_uq_pro_wj 255
|
||||||
|
kz_uq_holy_wj 260
|
||||||
|
kz_uq_leet_wj 265
|
||||||
|
kz_uq_god_wj 268
|
||||||
|
kz_uq_dom_wj 270
|
||||||
|
|
||||||
|
// Drop BhopJump
|
||||||
|
kz_uq_good_dbj 240
|
||||||
|
kz_uq_pro_dbj 250
|
||||||
|
kz_uq_holy_dbj 260
|
||||||
|
kz_uq_leet_dbj 263
|
||||||
|
kz_uq_god_dbj 265
|
||||||
|
kz_uq_dom_dbj 267
|
||||||
|
|
||||||
|
// StandUp CountJump (Double or Multi StandUp CountJump=SCJ+10units)(if 100aa all cvar dist +10 units)
|
||||||
|
kz_uq_good_scj 245
|
||||||
|
kz_uq_pro_scj 250
|
||||||
|
kz_uq_holy_scj 255
|
||||||
|
kz_uq_leet_scj 257
|
||||||
|
kz_uq_god_scj 260
|
||||||
|
kz_uq_dom_scj 262
|
||||||
|
|
||||||
|
// Drop StandUp CountJump(double,multi)
|
||||||
|
kz_uq_good_dropscj 250
|
||||||
|
kz_uq_pro_dropscj 255
|
||||||
|
kz_uq_holy_dropscj 260
|
||||||
|
kz_uq_leet_dropscj 263
|
||||||
|
kz_uq_god_dropscj 265
|
||||||
|
kz_uq_dom_dropscj 267
|
||||||
|
|
||||||
|
// Up Bhop
|
||||||
|
kz_uq_good_upbj 225
|
||||||
|
kz_uq_pro_upbj 230
|
||||||
|
kz_uq_holy_upbj 235
|
||||||
|
kz_uq_leet_upbj 240
|
||||||
|
kz_uq_god_upbj 242
|
||||||
|
kz_uq_dom_upbj 245
|
||||||
|
|
||||||
|
// Up StandBhop
|
||||||
|
kz_uq_good_upsbj 225
|
||||||
|
kz_uq_pro_upsbj 230
|
||||||
|
kz_uq_holy_upsbj 235
|
||||||
|
kz_uq_leet_upsbj 240
|
||||||
|
kz_uq_god_upsbj 242
|
||||||
|
kz_uq_dom_upsbj 245
|
||||||
|
|
||||||
|
// Bhop In Duck(Up Bhop In Duck)
|
||||||
|
kz_uq_good_bhopinduck 205
|
||||||
|
kz_uq_pro_bhopinduck 210
|
||||||
|
kz_uq_holy_bhopinduck 212
|
||||||
|
kz_uq_leet_bhopinduck 215
|
||||||
|
kz_uq_god_bhopinduck 217
|
||||||
|
kz_uq_dom_bhopinduck 220
|
||||||
|
|
||||||
|
// Duck Bhop
|
||||||
|
kz_uq_good_duckbhop 120
|
||||||
|
kz_uq_pro_duckbhop 130
|
||||||
|
kz_uq_holy_duckbhop 140
|
||||||
|
kz_uq_leet_duckbhop 150
|
||||||
|
kz_uq_god_duckbhop 160
|
||||||
|
kz_uq_dom_duckbhop 162
|
||||||
|
|
||||||
|
// Real Ladder Bhop
|
||||||
|
kz_uq_good_realldbhop 240
|
||||||
|
kz_uq_pro_realldbhop 250
|
||||||
|
kz_uq_holy_realldbhop 255
|
||||||
|
kz_uq_leet_realldbhop 260
|
||||||
|
kz_uq_god_realldbhop 265
|
||||||
|
kz_uq_god_realldbhop 267
|
||||||
|
|
53
amxmodx/configs/users.ini
Executable file
53
amxmodx/configs/users.ini
Executable file
|
@ -0,0 +1,53 @@
|
||||||
|
; Users configuration file
|
||||||
|
; File location: $moddir/addons/amxmodx/configs/users.ini
|
||||||
|
|
||||||
|
; Line starting with ; is a comment
|
||||||
|
|
||||||
|
; Access flags:
|
||||||
|
; a - immunity (can't be kicked/banned/slayed/slapped and affected by other commmands)
|
||||||
|
; b - reservation (can join on reserved slots)
|
||||||
|
; c - amx_kick command
|
||||||
|
; d - amx_ban and amx_unban commands (permanent and temporary bans)
|
||||||
|
; e - amx_slay and amx_slap commands
|
||||||
|
; f - amx_map command
|
||||||
|
; g - amx_cvar command (not all cvars will be available)
|
||||||
|
; h - amx_cfg command
|
||||||
|
; i - amx_chat and other chat commands
|
||||||
|
; j - amx_vote and other vote commands
|
||||||
|
; k - access to sv_password cvar (by amx_cvar command)
|
||||||
|
; l - access to amx_rcon command and rcon_password cvar (by amx_cvar command)
|
||||||
|
; m - custom level A (for additional plugins)
|
||||||
|
; n - custom level B
|
||||||
|
; o - custom level C
|
||||||
|
; p - custom level D
|
||||||
|
; q - custom level E
|
||||||
|
; r - custom level F
|
||||||
|
; s - custom level G
|
||||||
|
; t - custom level H
|
||||||
|
; u - menu access
|
||||||
|
; v - amx_ban and amx_unban commands (temporary bans only, about amx_unban, only self performed ban during map gonna be allowed)
|
||||||
|
; z - user (no admin)
|
||||||
|
|
||||||
|
; Account flags:
|
||||||
|
; a - disconnect player on invalid password
|
||||||
|
; b - clan tag
|
||||||
|
; c - this is steamid/wonid
|
||||||
|
; d - this is ip
|
||||||
|
; e - password is not checked (only name/ip/steamid needed)
|
||||||
|
; k - name or tag is case sensitive. eg: if you set it so the name "Ham"
|
||||||
|
; is protected and case sensitive (flags "k" only), then anybody
|
||||||
|
; can use the names "haM", "HAM", "ham", etc, but not "Ham"
|
||||||
|
|
||||||
|
; Password:
|
||||||
|
; Add to your autoexec.cfg: setinfo _pw "<password>"
|
||||||
|
; Change _pw to the value of amx_password_field
|
||||||
|
|
||||||
|
; Format of admin account:
|
||||||
|
; <name|ip|steamid> <password> <access flags> <account flags>
|
||||||
|
|
||||||
|
; Examples of admin accounts:
|
||||||
|
; "STEAM_0:0:123456" "" "abcdefghijklmnopqrstuv" "ce"
|
||||||
|
; "123.45.67.89" "" "abcdefghijklmnopqrstuv" "de"
|
||||||
|
; "My Name" "my_password" "abcdefghijklmnopqrstuv" "a"
|
||||||
|
|
||||||
|
"loopback" "" "abcdefghijklmnopqrstuv" "de"
|
BIN
amxmodx/dlls/amxmodx_mm_i386.so
Normal file
BIN
amxmodx/dlls/amxmodx_mm_i386.so
Normal file
Binary file not shown.
BIN
amxmodx/modules/amxxarch_amxx_i386.so
Normal file
BIN
amxmodx/modules/amxxarch_amxx_i386.so
Normal file
Binary file not shown.
BIN
amxmodx/modules/cstrike_amxx_i386.so
Executable file
BIN
amxmodx/modules/cstrike_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/csx_amxx_i386.so
Executable file
BIN
amxmodx/modules/csx_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/curl_amxx_i386.so
Normal file
BIN
amxmodx/modules/curl_amxx_i386.so
Normal file
Binary file not shown.
BIN
amxmodx/modules/curl_amxx_i386.so.bak
Normal file
BIN
amxmodx/modules/curl_amxx_i386.so.bak
Normal file
Binary file not shown.
BIN
amxmodx/modules/engine_amxx_i386.so
Executable file
BIN
amxmodx/modules/engine_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/fakemeta_amxx_i386.so
Executable file
BIN
amxmodx/modules/fakemeta_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/fun_amxx_i386.so
Executable file
BIN
amxmodx/modules/fun_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/geoip_amxx_i386.so
Executable file
BIN
amxmodx/modules/geoip_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/hamsandwich_amxx_i386.so
Executable file
BIN
amxmodx/modules/hamsandwich_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/json_amxx_i386.so
Executable file
BIN
amxmodx/modules/json_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/mysql_amxx_i386.so
Executable file
BIN
amxmodx/modules/mysql_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/nvault_amxx_i386.so
Executable file
BIN
amxmodx/modules/nvault_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/regex_amxx_i386.so
Executable file
BIN
amxmodx/modules/regex_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/sockets_amxx_i386.so
Executable file
BIN
amxmodx/modules/sockets_amxx_i386.so
Executable file
Binary file not shown.
BIN
amxmodx/modules/sqlite_amxx_i386.so
Executable file
BIN
amxmodx/modules/sqlite_amxx_i386.so
Executable file
Binary file not shown.
2232
amxmodx/scripting/KZ_Bot.sma
Normal file
2232
amxmodx/scripting/KZ_Bot.sma
Normal file
File diff suppressed because it is too large
Load Diff
317
amxmodx/scripting/KZ_Chat.sma
Normal file
317
amxmodx/scripting/KZ_Chat.sma
Normal file
|
@ -0,0 +1,317 @@
|
||||||
|
#include <amxmodx>
|
||||||
|
#include <amxmisc>
|
||||||
|
#include <colorchat>
|
||||||
|
|
||||||
|
#define PLUGIN "KZ[L]Chat"
|
||||||
|
#define VERSION "1.05"
|
||||||
|
#define AUTHOR "`L."
|
||||||
|
|
||||||
|
#pragma tabsize 0
|
||||||
|
|
||||||
|
new g_msgChannel;
|
||||||
|
|
||||||
|
new g_Values[10][] = {{255, 255, 255}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}, {255, 255, 0}, {255, 0, 255}, {0, 255, 255}, {227, 96, 8}, {45, 89, 116}, {103, 44, 38}};
|
||||||
|
new Float:g_Pos[4][] = {{0.0, 0.0}, {0.05, 0.55}, {-1.0, 0.2}, {-1.0, 0.7}};
|
||||||
|
|
||||||
|
// ALL CHAT
|
||||||
|
new COLCHAR[3][2] = { "^x03"/*team col*/, "^x04"/*green*/, "^x01"/*white*/ };
|
||||||
|
|
||||||
|
new alv_sndr, alv_str2[26], alv_str4[101];
|
||||||
|
new msg[200];
|
||||||
|
|
||||||
|
public plugin_init() {
|
||||||
|
register_plugin(PLUGIN, VERSION, AUTHOR);
|
||||||
|
|
||||||
|
register_clcmd("say", "cmdSayChat", _, "@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message");
|
||||||
|
register_clcmd("say_team", "cmdSayAdmin", _, "@<text> - displays message to admins");
|
||||||
|
register_concmd("amx_chat", "cmdChat", _, "<message> - sends message to admins");
|
||||||
|
|
||||||
|
register_message(get_user_msgid("SayText"), "col_changer");
|
||||||
|
register_message(get_user_msgid("ShowMenu"), "message_show_menu");
|
||||||
|
register_message(get_user_msgid("VGUIMenu"), "message_vgui_menu");
|
||||||
|
register_dictionary("common.txt");
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdSayChat(id, level, cid) {
|
||||||
|
if(!cmd_access(id, ADMIN_CHAT, cid, 2,false))
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
|
||||||
|
new said[6], i = 0;
|
||||||
|
read_argv(1, said, charsmax(said));
|
||||||
|
|
||||||
|
while (said[i] == '@')
|
||||||
|
i++
|
||||||
|
|
||||||
|
if(!i || i > 3)
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
|
||||||
|
new message[192], a = 0;
|
||||||
|
read_args(message, charsmax(message));
|
||||||
|
remove_quotes(message);
|
||||||
|
|
||||||
|
switch(said[i]) {
|
||||||
|
case 'r': a = 1;
|
||||||
|
case 'g': a = 2;
|
||||||
|
case 'b': a = 3;
|
||||||
|
case 'y': a = 4;
|
||||||
|
case 'm': a = 5;
|
||||||
|
case 'c': a = 6;
|
||||||
|
case 'o': a = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
new n, s = i;
|
||||||
|
if(a) {
|
||||||
|
n++;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
while(said[s] && isspace(said[s])) {
|
||||||
|
n++;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
|
||||||
|
new name[32];
|
||||||
|
get_user_name(id, name, charsmax(name));
|
||||||
|
|
||||||
|
if(++g_msgChannel > 6 || g_msgChannel < 3)
|
||||||
|
g_msgChannel = 3;
|
||||||
|
|
||||||
|
new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0;
|
||||||
|
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos, 0, 6.0, 6.0, 0.5, 0.15, -1);
|
||||||
|
show_hudmessage(0, "%s : %s", name, message[i + n]);
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdSayAdmin(id) {
|
||||||
|
new said[2];
|
||||||
|
read_argv(1, said, charsmax(said));
|
||||||
|
|
||||||
|
if(said[0] != '@')
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
|
||||||
|
new message[192], name[32];
|
||||||
|
new players[32], inum, pl;
|
||||||
|
|
||||||
|
read_args(message, charsmax(message));
|
||||||
|
remove_quotes(message);
|
||||||
|
|
||||||
|
get_user_name(id, name, charsmax(name));
|
||||||
|
|
||||||
|
if(is_user_admin(id))
|
||||||
|
format(message, charsmax(message), "^1[^4ADMINs^1/^4VIPs^1] ^3%s^1 : %s", name, message[1]);
|
||||||
|
else
|
||||||
|
format(message, charsmax(message), "^1(USER) %s : %s", name, message[1]);
|
||||||
|
|
||||||
|
get_players(players, inum, "ch");
|
||||||
|
|
||||||
|
for(new i = 0; i < inum; ++i) {
|
||||||
|
pl = players[i];
|
||||||
|
if(pl == id || get_user_flags(pl) & ADMIN_CHAT)
|
||||||
|
ColorChat(id, RED, "%s", message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdChat(id) {
|
||||||
|
if(!access(id, ADMIN_CHAT))
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
|
||||||
|
new message[192];
|
||||||
|
|
||||||
|
read_args(message, charsmax(message));
|
||||||
|
remove_quotes(message);
|
||||||
|
|
||||||
|
if(!message[0])
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
|
||||||
|
new name[32], players[32], inum, authid[32], pl; //, userid;
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid));
|
||||||
|
get_user_name(id, name, charsmax(name));
|
||||||
|
//userid = get_user_userid(id);
|
||||||
|
get_players(players, inum, "ch");
|
||||||
|
|
||||||
|
log_amx("Chat: ^"%s [%s]^" chat ^"%s^"", name, authid, message);
|
||||||
|
log_message("^"%s [%s]^" triggered ^"amx_chat^" (text ^"%s^")", name, authid, message);
|
||||||
|
|
||||||
|
format(message, charsmax(message), "(ADMINS) %s : %s", name, message);
|
||||||
|
console_print(id, "%s", message);
|
||||||
|
|
||||||
|
for(new i = 0; i < inum; ++i) {
|
||||||
|
pl = players[i];
|
||||||
|
if(access(pl, ADMIN_CHAT))
|
||||||
|
client_print(pl, print_chat, "%s", message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
/////////////////////////// ALL CHAT /////////////////////////////////
|
||||||
|
|
||||||
|
public col_changer(msg_id, msg_dest, rcvr) {
|
||||||
|
new str2[26];
|
||||||
|
get_msg_arg_string(2, str2, 25);
|
||||||
|
if(equal(str2, "#Cstrike_Chat", 13)) {
|
||||||
|
new str3[22];
|
||||||
|
get_msg_arg_string(3, str3, 21);
|
||||||
|
|
||||||
|
if(!strlen(str3)) {
|
||||||
|
new str4[101], reshetka;
|
||||||
|
get_msg_arg_string(4, str4, charsmax(str4));
|
||||||
|
if(containi(str4, "#") != -1) {
|
||||||
|
for(new i = 0; i <= strlen(str4); i++)
|
||||||
|
if(str4[i] == '#') reshetka++;
|
||||||
|
if(reshetka >= 5)
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
new sndr = get_msg_arg_int(1);
|
||||||
|
new bool:is_team_msg = !bool:equal(str2, "#Cstrike_Chat_All", 17);
|
||||||
|
|
||||||
|
new sndr_team = get_user_team(sndr);
|
||||||
|
new bool:is_sndr_spec = !bool:(0 < sndr_team < 3);
|
||||||
|
new bool:same_as_last = bool:(alv_sndr == sndr && equal(alv_str2, str2) && equal(alv_str4, str4));
|
||||||
|
|
||||||
|
if(!same_as_last) {
|
||||||
|
if(!(is_team_msg && (is_sndr_spec || is_team_msg))) {
|
||||||
|
new flags[5], team[10];
|
||||||
|
if(is_user_alive(sndr))
|
||||||
|
flags = "bch";
|
||||||
|
else
|
||||||
|
flags = "ach";
|
||||||
|
|
||||||
|
if(is_team_msg) {
|
||||||
|
add(flags[strlen(flags)], 4, "e");
|
||||||
|
if(sndr_team == 1)
|
||||||
|
team = "TERRORIST";
|
||||||
|
else
|
||||||
|
team = "CT"
|
||||||
|
}
|
||||||
|
|
||||||
|
new players[32], num;
|
||||||
|
get_players(players, num, flags, team);
|
||||||
|
|
||||||
|
if(get_user_flags(sndr) & ADMIN_CFG)
|
||||||
|
buildmsg(sndr, is_sndr_spec, is_team_msg, sndr_team, 0, 1, str4);
|
||||||
|
else
|
||||||
|
buildmsg(sndr, is_sndr_spec, is_team_msg, sndr_team, 0, 2, str4);
|
||||||
|
|
||||||
|
for(new i=0; i < num; i++) {
|
||||||
|
message_begin(MSG_ONE, get_user_msgid("SayText"), _, players[i]);
|
||||||
|
write_byte(sndr);
|
||||||
|
write_string(msg);
|
||||||
|
message_end();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
alv_sndr = sndr;
|
||||||
|
alv_str2 = str2;
|
||||||
|
alv_str4 = str4;
|
||||||
|
if(task_exists(411))
|
||||||
|
remove_task(411);
|
||||||
|
set_task(0.1, "task_clear_antiloop_vars", 411);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(get_user_flags(sndr) & ADMIN_CFG) {
|
||||||
|
if(!same_as_last)
|
||||||
|
buildmsg(sndr, is_sndr_spec, is_team_msg, sndr_team, 0, 1, str4);
|
||||||
|
|
||||||
|
set_msg_arg_string(2, msg);
|
||||||
|
set_msg_arg_string(4, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public buildmsg(sndr, is_sndr_spec, is_team_msg, sndr_team, namecol, msgcol, str4[]) {
|
||||||
|
new sndr_name[33];
|
||||||
|
get_user_name(sndr, sndr_name, 32);
|
||||||
|
|
||||||
|
new prefix[30] = "^x01";
|
||||||
|
|
||||||
|
if(is_sndr_spec)
|
||||||
|
prefix = "^x01[SPEC] ";
|
||||||
|
else if(!is_user_alive(sndr))
|
||||||
|
prefix = "^x01[DEAD] ";
|
||||||
|
|
||||||
|
if(is_team_msg) {
|
||||||
|
if(is_sndr_spec)
|
||||||
|
prefix = "^x01[Spectator] ";
|
||||||
|
else if(sndr_team == 1)
|
||||||
|
add(prefix[strlen(prefix)-1], 29, "[Terrorist] ");
|
||||||
|
else if(sndr_team == 2)
|
||||||
|
add(prefix[strlen(prefix)-1], 29, "[Counter-Terrorist] ");
|
||||||
|
}
|
||||||
|
|
||||||
|
format(msg, 199, "%s%s%s : %s%s", strlen(prefix) > 1 ? prefix : "", COLCHAR[namecol], sndr_name, COLCHAR[msgcol], str4);
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
public task_clear_antiloop_vars() {
|
||||||
|
alv_sndr = 0;
|
||||||
|
alv_str2 = "";
|
||||||
|
alv_str4 = "";
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Auto Join CT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
public message_show_menu(msgid, dest, id) {
|
||||||
|
if(!should_autojoin(id))
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
|
||||||
|
static team_select[] = "#Team_Select";
|
||||||
|
static menu_text_code[sizeof team_select];
|
||||||
|
get_msg_arg_string(4, menu_text_code, sizeof menu_text_code - 1);
|
||||||
|
if(!equal(menu_text_code, team_select))
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
|
||||||
|
set_force_team_join_task(id, msgid);
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
public message_vgui_menu(msgid, dest, id) {
|
||||||
|
if(get_msg_arg_int(1) != 2 || !should_autojoin(id))
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
|
||||||
|
set_force_team_join_task(id, msgid);
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool:should_autojoin(id) {
|
||||||
|
return (2 && !get_user_team(id) && !task_exists(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
set_force_team_join_task(id, menu_msgid) {
|
||||||
|
static param_menu_msgid[2];
|
||||||
|
param_menu_msgid[0] = menu_msgid;
|
||||||
|
set_task(0.1, "task_force_team_join", id, param_menu_msgid, sizeof param_menu_msgid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public task_force_team_join(menu_msgid[], id) {
|
||||||
|
if(get_user_team(id))
|
||||||
|
return;
|
||||||
|
|
||||||
|
force_team_join(id, menu_msgid[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
stock force_team_join(id, menu_msgid, const team[] = "2", const class[] = "1") {
|
||||||
|
static jointeam[] = "jointeam";
|
||||||
|
if(class[0] == '0') {
|
||||||
|
engclient_cmd(id, jointeam, team);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static msg_block, joinclass[] = "joinclass";
|
||||||
|
msg_block = get_msg_block(menu_msgid);
|
||||||
|
set_msg_block(menu_msgid, BLOCK_SET);
|
||||||
|
engclient_cmd(id, jointeam, team);
|
||||||
|
engclient_cmd(id, joinclass, class)
|
||||||
|
set_msg_block(menu_msgid, msg_block);
|
||||||
|
}
|
3177
amxmodx/scripting/KZ_Engine.sma
Normal file
3177
amxmodx/scripting/KZ_Engine.sma
Normal file
File diff suppressed because it is too large
Load Diff
635
amxmodx/scripting/admin_sql.sma
Executable file
635
amxmodx/scripting/admin_sql.sma
Executable file
|
@ -0,0 +1,635 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Admin Base Plugin
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
#include <amxmisc>
|
||||||
|
#include <sqlx>
|
||||||
|
|
||||||
|
new AdminCount;
|
||||||
|
|
||||||
|
new PLUGINNAME[] = "AMX Mod X"
|
||||||
|
|
||||||
|
#define ADMIN_LOOKUP (1<<0)
|
||||||
|
#define ADMIN_NORMAL (1<<1)
|
||||||
|
#define ADMIN_STEAM (1<<2)
|
||||||
|
#define ADMIN_IPADDR (1<<3)
|
||||||
|
#define ADMIN_NAME (1<<4)
|
||||||
|
|
||||||
|
new bool:g_CaseSensitiveName[MAX_PLAYERS + 1];
|
||||||
|
|
||||||
|
// pcvars
|
||||||
|
new amx_mode;
|
||||||
|
new amx_password_field;
|
||||||
|
new amx_default_access;
|
||||||
|
|
||||||
|
public plugin_init() {
|
||||||
|
register_plugin("Admin Base (SQL)", AMXX_VERSION_STR, "AMXX Dev Team")
|
||||||
|
register_dictionary("admin.txt")
|
||||||
|
register_dictionary("common.txt")
|
||||||
|
amx_mode=register_cvar("amx_mode", "1", FCVAR_PROTECTED)
|
||||||
|
amx_password_field=register_cvar("amx_password_field", "_pw", FCVAR_PROTECTED)
|
||||||
|
amx_default_access=register_cvar("amx_default_access", "", FCVAR_PROTECTED)
|
||||||
|
|
||||||
|
register_cvar("amx_vote_ratio", "0.02")
|
||||||
|
register_cvar("amx_vote_time", "10")
|
||||||
|
register_cvar("amx_vote_answers", "1")
|
||||||
|
register_cvar("amx_vote_delay", "60")
|
||||||
|
register_cvar("amx_last_voting", "0")
|
||||||
|
register_cvar("amx_show_activity", "2", FCVAR_PROTECTED)
|
||||||
|
register_cvar("amx_votekick_ratio", "0.40")
|
||||||
|
register_cvar("amx_voteban_ratio", "0.40")
|
||||||
|
register_cvar("amx_votemap_ratio", "0.40")
|
||||||
|
|
||||||
|
set_cvar_float("amx_last_voting", 0.0)
|
||||||
|
|
||||||
|
register_srvcmd("amx_sqladmins", "adminSql")
|
||||||
|
register_cvar("amx_sql_table", "admins", FCVAR_PROTECTED)
|
||||||
|
register_cvar("amx_sql_host", "127.0.0.1", FCVAR_PROTECTED)
|
||||||
|
register_cvar("amx_sql_user", "root", FCVAR_PROTECTED)
|
||||||
|
register_cvar("amx_sql_pass", "", FCVAR_PROTECTED)
|
||||||
|
register_cvar("amx_sql_db", "amx", FCVAR_PROTECTED)
|
||||||
|
register_cvar("amx_sql_type", "mysql", FCVAR_PROTECTED)
|
||||||
|
register_cvar("amx_sql_timeout", "60", FCVAR_PROTECTED)
|
||||||
|
|
||||||
|
register_concmd("amx_reloadadmins", "cmdReload", ADMIN_CFG)
|
||||||
|
register_concmd("amx_addadmin", "addadminfn", ADMIN_RCON, "<playername|auth> <accessflags> [password] [authtype] - add specified player as an admin to users.ini")
|
||||||
|
|
||||||
|
remove_user_flags(0, read_flags("z")) // Remove 'user' flag from server rights
|
||||||
|
|
||||||
|
new configsDir[64]
|
||||||
|
get_configsdir(configsDir, charsmax(configsDir))
|
||||||
|
|
||||||
|
server_cmd("exec %s/sql.cfg", configsDir)
|
||||||
|
|
||||||
|
// Create a vector of 5 cells to store the info.
|
||||||
|
//AdminList=vector_create(5);
|
||||||
|
|
||||||
|
|
||||||
|
server_cmd("amx_sqladmins")
|
||||||
|
}
|
||||||
|
public client_connect(id) {
|
||||||
|
g_CaseSensitiveName[id] = false;
|
||||||
|
}
|
||||||
|
public addadminfn(id, level, cid) {
|
||||||
|
if (!cmd_access(id, level, cid, 3))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new idtype = ADMIN_STEAM | ADMIN_LOOKUP
|
||||||
|
|
||||||
|
if (read_argc() >= 5) {
|
||||||
|
new t_arg[16]
|
||||||
|
read_argv(4, t_arg, charsmax(t_arg))
|
||||||
|
|
||||||
|
if (equali(t_arg, "steam") || equali(t_arg, "steamid") || equali(t_arg, "auth"))
|
||||||
|
idtype = ADMIN_STEAM
|
||||||
|
else if (equali(t_arg, "ip"))
|
||||||
|
idtype = ADMIN_IPADDR
|
||||||
|
else if (equali(t_arg, "name") || equali(t_arg, "nick")) {
|
||||||
|
idtype = ADMIN_NAME
|
||||||
|
if (equali(t_arg, "name"))
|
||||||
|
idtype |= ADMIN_LOOKUP
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console_print(id, "[%s] Unknown id type ^"%s^", use one of: steamid, ip, name", PLUGINNAME, t_arg)
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new arg[33]
|
||||||
|
read_argv(1, arg, charsmax(arg))
|
||||||
|
new player = -1
|
||||||
|
|
||||||
|
if (idtype & ADMIN_STEAM) {
|
||||||
|
if (containi(arg, "STEAM_0:") == -1) {
|
||||||
|
idtype |= ADMIN_LOOKUP
|
||||||
|
player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
new _steamid[44]
|
||||||
|
static _players[MAX_PLAYERS], _num, _pv
|
||||||
|
get_players(_players, _num)
|
||||||
|
for (new _i=0; _i<_num; _i++) {
|
||||||
|
_pv = _players[_i]
|
||||||
|
get_user_authid(_pv, _steamid, charsmax(_steamid))
|
||||||
|
if (!_steamid[0])
|
||||||
|
continue
|
||||||
|
if (equal(_steamid, arg)) {
|
||||||
|
player = _pv
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (player < 1)
|
||||||
|
idtype &= ~ADMIN_LOOKUP
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (idtype & ADMIN_NAME) {
|
||||||
|
player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS)
|
||||||
|
if (player)
|
||||||
|
idtype |= ADMIN_LOOKUP
|
||||||
|
else
|
||||||
|
idtype &= ~ADMIN_LOOKUP
|
||||||
|
}
|
||||||
|
else if (idtype & ADMIN_IPADDR) {
|
||||||
|
new len = strlen(arg)
|
||||||
|
new dots, chars
|
||||||
|
|
||||||
|
for (new i = 0; i < len; i++) {
|
||||||
|
if (arg[i] == '.') {
|
||||||
|
if (!chars || chars > 3)
|
||||||
|
break
|
||||||
|
|
||||||
|
if (++dots > 3)
|
||||||
|
break
|
||||||
|
|
||||||
|
chars = 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
chars++
|
||||||
|
|
||||||
|
if (dots != 3 || !chars || chars > 3) {
|
||||||
|
idtype |= ADMIN_LOOKUP
|
||||||
|
player = find_player("dh", arg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (idtype & ADMIN_LOOKUP && !player) {
|
||||||
|
console_print(id, "%L", id, "CL_NOT_FOUND")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
new flags[64]
|
||||||
|
read_argv(2, flags, charsmax(flags))
|
||||||
|
|
||||||
|
new password[64]
|
||||||
|
if (read_argc() >= 4)
|
||||||
|
read_argv(3, password, charsmax(password))
|
||||||
|
|
||||||
|
new auth[33]
|
||||||
|
new Comment[MAX_NAME_LENGTH]; // name of player to pass to comment field
|
||||||
|
if (idtype & ADMIN_LOOKUP) {
|
||||||
|
get_user_name(player, Comment, charsmax(Comment))
|
||||||
|
if (idtype & ADMIN_STEAM)
|
||||||
|
get_user_authid(player, auth, charsmax(auth))
|
||||||
|
else if (idtype & ADMIN_IPADDR)
|
||||||
|
get_user_ip(player, auth, charsmax(auth), 1)
|
||||||
|
else if (idtype & ADMIN_NAME)
|
||||||
|
get_user_name(player, auth, charsmax(auth))
|
||||||
|
} else
|
||||||
|
copy(auth, charsmax(auth), arg)
|
||||||
|
|
||||||
|
new type[16], len
|
||||||
|
|
||||||
|
if (idtype & ADMIN_STEAM)
|
||||||
|
len += format(type[len], charsmax(type) - len, "c")
|
||||||
|
else if (idtype & ADMIN_IPADDR)
|
||||||
|
len += format(type[len], charsmax(type) - len, "d")
|
||||||
|
|
||||||
|
if (strlen(password) > 0)
|
||||||
|
len += format(type[len], charsmax(type) - len, "a")
|
||||||
|
else
|
||||||
|
len += format(type[len], charsmax(type) - len, "e")
|
||||||
|
|
||||||
|
AddAdmin(id, auth, flags, password, type, Comment)
|
||||||
|
cmdReload(id, ADMIN_CFG, 0)
|
||||||
|
|
||||||
|
if (player > 0) {
|
||||||
|
new name[MAX_NAME_LENGTH]
|
||||||
|
get_user_info(player, "name", name, charsmax(name))
|
||||||
|
accessUser(player, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
AddAdmin(id, auth[], accessflags[], password[], flags[], comment[]="") {
|
||||||
|
new error[128], errno
|
||||||
|
|
||||||
|
new Handle:info = SQL_MakeStdTuple()
|
||||||
|
new Handle:sql = SQL_Connect(info, errno, error, charsmax(error))
|
||||||
|
|
||||||
|
if (sql == Empty_Handle) {
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "SQL_CANT_CON", error)
|
||||||
|
//backup to users.ini
|
||||||
|
// Make sure that the users.ini file exists.
|
||||||
|
new configsDir[64]
|
||||||
|
get_configsdir(configsDir, charsmax(configsDir))
|
||||||
|
format(configsDir, charsmax(configsDir), "%s/users.ini", configsDir)
|
||||||
|
|
||||||
|
if (!file_exists(configsDir)) {
|
||||||
|
console_print(id, "[%s] File ^"%s^" doesn't exist.", PLUGINNAME, configsDir)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure steamid isn't already in file.
|
||||||
|
new line = 0, textline[256], len
|
||||||
|
const SIZE = 63
|
||||||
|
new line_steamid[SIZE + 1], line_password[SIZE + 1], line_accessflags[SIZE + 1], line_flags[SIZE + 1], parsedParams
|
||||||
|
|
||||||
|
// <name|ip|steamid> <password> <access flags> <account flags>
|
||||||
|
while ((line = read_file(configsDir, line, textline, charsmax(textline), len))) {
|
||||||
|
if (len == 0 || equal(textline, ";", 1))
|
||||||
|
continue // comment line
|
||||||
|
|
||||||
|
parsedParams = parse(textline, line_steamid, SIZE, line_password, SIZE, line_accessflags, SIZE, line_flags, SIZE)
|
||||||
|
|
||||||
|
if (parsedParams != 4)
|
||||||
|
continue // Send warning/error?
|
||||||
|
|
||||||
|
if (containi(line_flags, flags) != -1 && equal(line_steamid, auth)) {
|
||||||
|
console_print(id, "[%s] %s already exists!", PLUGINNAME, auth)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we came here, steamid doesn't exist in users.ini. Add it.
|
||||||
|
new linetoadd[512]
|
||||||
|
|
||||||
|
if (comment[0]==0)
|
||||||
|
formatex(linetoadd, charsmax(linetoadd), "^r^n^"%s^" ^"%s^" ^"%s^" ^"%s^"", auth, password, accessflags, flags)
|
||||||
|
else
|
||||||
|
formatex(linetoadd, charsmax(linetoadd), "^r^n^"%s^" ^"%s^" ^"%s^" ^"%s^" ; %s", auth, password, accessflags, flags, comment)
|
||||||
|
console_print(id, "Adding:^n%s", linetoadd)
|
||||||
|
|
||||||
|
if (!write_file(configsDir, linetoadd))
|
||||||
|
console_print(id, "[%s] Failed writing to %s!", PLUGINNAME, configsDir)
|
||||||
|
}
|
||||||
|
|
||||||
|
new table[32]
|
||||||
|
|
||||||
|
get_cvar_string("amx_sql_table", table, charsmax(table))
|
||||||
|
|
||||||
|
new Handle:query = SQL_PrepareQuery(sql, "SELECT * FROM `%s` WHERE (`auth` = '%s')", table, auth)
|
||||||
|
|
||||||
|
if (!SQL_Execute(query)) {
|
||||||
|
SQL_QueryError(query, error, charsmax(error))
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "SQL_CANT_LOAD_ADMINS", error)
|
||||||
|
console_print(id, "[AMXX] %L", LANG_SERVER, "SQL_CANT_LOAD_ADMINS", error)
|
||||||
|
}
|
||||||
|
else if (SQL_NumResults(query))
|
||||||
|
console_print(id, "[%s] %s already exists!", PLUGINNAME, auth)
|
||||||
|
else {
|
||||||
|
console_print(id, "Adding to database:^n^"%s^" ^"%s^" ^"%s^" ^"%s^"", auth, password, accessflags, flags)
|
||||||
|
SQL_QueryAndIgnore(sql, "REPLACE INTO `%s` (`auth`, `password`, `access`, `flags`) VALUES ('%s', '%s', '%s', '%s')", table, auth, password, accessflags, flags)
|
||||||
|
}
|
||||||
|
|
||||||
|
SQL_FreeHandle(query)
|
||||||
|
SQL_FreeHandle(sql)
|
||||||
|
SQL_FreeHandle(info)
|
||||||
|
}
|
||||||
|
|
||||||
|
loadSettings(szFilename[]) {
|
||||||
|
new File=fopen(szFilename,"r");
|
||||||
|
|
||||||
|
if (File) {
|
||||||
|
new Text[512];
|
||||||
|
new Flags[32];
|
||||||
|
new Access[32]
|
||||||
|
new AuthData[44];
|
||||||
|
new Password[32];
|
||||||
|
|
||||||
|
while (!feof(File)) {
|
||||||
|
fgets(File, Text, charsmax(Text));
|
||||||
|
|
||||||
|
trim(Text);
|
||||||
|
|
||||||
|
// comment
|
||||||
|
if (Text[0]==';')
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Flags[0]=0;
|
||||||
|
Access[0]=0;
|
||||||
|
AuthData[0]=0;
|
||||||
|
Password[0]=0;
|
||||||
|
|
||||||
|
// not enough parameters
|
||||||
|
if (parse(Text,AuthData,charsmax(AuthData),Password,charsmax(Password),Access,charsmax(Access),Flags,charsmax(Flags)) < 2)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
admins_push(AuthData,Password,read_flags(Access),read_flags(Flags));
|
||||||
|
|
||||||
|
AdminCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(File);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (AdminCount == 1)
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "LOADED_ADMIN");
|
||||||
|
else
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "LOADED_ADMINS", AdminCount);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public adminSql() {
|
||||||
|
new table[32], error[128], type[12], errno
|
||||||
|
|
||||||
|
new Handle:info = SQL_MakeStdTuple()
|
||||||
|
new Handle:sql = SQL_Connect(info, errno, error, charsmax(error))
|
||||||
|
|
||||||
|
get_cvar_string("amx_sql_table", table, charsmax(table))
|
||||||
|
|
||||||
|
SQL_GetAffinity(type, charsmax(type))
|
||||||
|
|
||||||
|
if (sql == Empty_Handle) {
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "SQL_CANT_CON", error)
|
||||||
|
|
||||||
|
//backup to users.ini
|
||||||
|
new configsDir[64]
|
||||||
|
|
||||||
|
get_configsdir(configsDir, charsmax(configsDir))
|
||||||
|
format(configsDir, charsmax(configsDir), "%s/users.ini", configsDir)
|
||||||
|
loadSettings(configsDir) // Load admins accounts
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
new Handle:query
|
||||||
|
|
||||||
|
if (equali(type, "sqlite")) {
|
||||||
|
if (!sqlite_TableExists(sql, table))
|
||||||
|
SQL_QueryAndIgnore(sql, "CREATE TABLE %s ( auth TEXT NOT NULL DEFAULT '', password TEXT NOT NULL DEFAULT '', access TEXT NOT NULL DEFAULT '', flags TEXT NOT NULL DEFAULT '' )", table)
|
||||||
|
|
||||||
|
query = SQL_PrepareQuery(sql, "SELECT auth, password, access, flags FROM %s", table)
|
||||||
|
} else {
|
||||||
|
SQL_QueryAndIgnore(sql, "CREATE TABLE IF NOT EXISTS `%s` ( `auth` VARCHAR( 32 ) NOT NULL, `password` VARCHAR( 32 ) NOT NULL, `access` VARCHAR( 32 ) NOT NULL, `flags` VARCHAR( 32 ) NOT NULL ) COMMENT = 'AMX Mod X Admins'", table)
|
||||||
|
query = SQL_PrepareQuery(sql,"SELECT `auth`,`password`,`access`,`flags` FROM `%s`", table)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SQL_Execute(query)) {
|
||||||
|
SQL_QueryError(query, error, charsmax(error))
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "SQL_CANT_LOAD_ADMINS", error)
|
||||||
|
}
|
||||||
|
else if (!SQL_NumResults(query))
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "NO_ADMINS")
|
||||||
|
else {
|
||||||
|
|
||||||
|
AdminCount = 0
|
||||||
|
|
||||||
|
/** do this incase people change the query order and forget to modify below */
|
||||||
|
new qcolAuth = SQL_FieldNameToNum(query, "auth")
|
||||||
|
new qcolPass = SQL_FieldNameToNum(query, "password")
|
||||||
|
new qcolAccess = SQL_FieldNameToNum(query, "access")
|
||||||
|
new qcolFlags = SQL_FieldNameToNum(query, "flags")
|
||||||
|
|
||||||
|
new AuthData[44];
|
||||||
|
new Password[44];
|
||||||
|
new Access[32];
|
||||||
|
new Flags[32];
|
||||||
|
|
||||||
|
while (SQL_MoreResults(query)) {
|
||||||
|
SQL_ReadResult(query, qcolAuth, AuthData, charsmax(AuthData));
|
||||||
|
SQL_ReadResult(query, qcolPass, Password, charsmax(Password));
|
||||||
|
SQL_ReadResult(query, qcolAccess, Access, charsmax(Access));
|
||||||
|
SQL_ReadResult(query, qcolFlags, Flags, charsmax(Flags));
|
||||||
|
|
||||||
|
if(strlen(Flags) > 0) {
|
||||||
|
admins_push(AuthData,Password,read_flags(Access),read_flags(Flags));
|
||||||
|
++AdminCount;
|
||||||
|
}
|
||||||
|
SQL_NextRow(query)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (AdminCount == 1)
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "SQL_LOADED_ADMIN")
|
||||||
|
else
|
||||||
|
server_print("[AMXX] %L", LANG_SERVER, "SQL_LOADED_ADMINS", AdminCount)
|
||||||
|
|
||||||
|
SQL_FreeHandle(query)
|
||||||
|
SQL_FreeHandle(sql)
|
||||||
|
SQL_FreeHandle(info)
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdReload(id, level, cid) {
|
||||||
|
if (!cmd_access(id, level, cid, 1))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
//strip original flags (patch submitted by mrhunt)
|
||||||
|
remove_user_flags(0, read_flags("z"))
|
||||||
|
|
||||||
|
admins_flush();
|
||||||
|
|
||||||
|
AdminCount = 0
|
||||||
|
adminSql()
|
||||||
|
|
||||||
|
if (id != 0) {
|
||||||
|
if (AdminCount == 1)
|
||||||
|
console_print(id, "[AMXX] %L", LANG_SERVER, "SQL_LOADED_ADMIN")
|
||||||
|
else
|
||||||
|
console_print(id, "[AMXX] %L", LANG_SERVER, "SQL_LOADED_ADMINS", AdminCount)
|
||||||
|
}
|
||||||
|
|
||||||
|
new players[MAX_PLAYERS], num, pv
|
||||||
|
new name[MAX_NAME_LENGTH]
|
||||||
|
get_players(players, num)
|
||||||
|
for (new i=0; i<num; i++) {
|
||||||
|
pv = players[i]
|
||||||
|
get_user_name(pv, name, charsmax(name))
|
||||||
|
accessUser(pv, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
getAccess(id, name[], authid[], ip[], password[]) {
|
||||||
|
new index = -1
|
||||||
|
new result = 0
|
||||||
|
|
||||||
|
static Count;
|
||||||
|
static Flags;
|
||||||
|
static Access;
|
||||||
|
static AuthData[44];
|
||||||
|
static Password[32];
|
||||||
|
|
||||||
|
g_CaseSensitiveName[id] = false;
|
||||||
|
|
||||||
|
Count=admins_num();
|
||||||
|
for (new i = 0; i < Count; ++i) {
|
||||||
|
Flags=admins_lookup(i,AdminProp_Flags);
|
||||||
|
admins_lookup(i,AdminProp_Auth,AuthData,charsmax(AuthData));
|
||||||
|
|
||||||
|
if (Flags & FLAG_AUTHID) {
|
||||||
|
if (equal(authid, AuthData)) {
|
||||||
|
index = i
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (Flags & FLAG_IP) {
|
||||||
|
new c = strlen(AuthData)
|
||||||
|
|
||||||
|
if (AuthData[c - 1] == '.') { /* check if this is not a xxx.xxx. format */
|
||||||
|
if (equal(AuthData, ip, c)) {
|
||||||
|
index = i
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} /* in other case an IP must just match */
|
||||||
|
else if (equal(ip, AuthData)) {
|
||||||
|
index = i
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (Flags & FLAG_CASE_SENSITIVE) {
|
||||||
|
if (Flags & FLAG_TAG) {
|
||||||
|
if (contain(name, AuthData) != -1) {
|
||||||
|
index = i
|
||||||
|
g_CaseSensitiveName[id] = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (equal(name, AuthData)) {
|
||||||
|
index = i
|
||||||
|
g_CaseSensitiveName[id] = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (Flags & FLAG_TAG) {
|
||||||
|
if (containi(name, AuthData) != -1) {
|
||||||
|
index = i
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (equali(name, AuthData)) {
|
||||||
|
index = i
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index != -1) {
|
||||||
|
Access=admins_lookup(index,AdminProp_Access);
|
||||||
|
|
||||||
|
if (Flags & FLAG_NOPASS) {
|
||||||
|
result |= 8
|
||||||
|
new sflags[32]
|
||||||
|
|
||||||
|
get_flags(Access, sflags, charsmax(sflags))
|
||||||
|
set_user_flags(id, Access)
|
||||||
|
|
||||||
|
log_amx("Login: ^"%s<%d><%s><>^" became an admin (account ^"%s^") (access ^"%s^") (address ^"%s^")", name, get_user_userid(id), authid, AuthData, sflags, ip)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
admins_lookup(index,AdminProp_Password,Password,charsmax(Password));
|
||||||
|
|
||||||
|
if (equal(password, Password)) {
|
||||||
|
result |= 12
|
||||||
|
set_user_flags(id, Access)
|
||||||
|
|
||||||
|
new sflags[32]
|
||||||
|
get_flags(Access, sflags, charsmax(sflags))
|
||||||
|
|
||||||
|
log_amx("Login: ^"%s<%d><%s><>^" became an admin (account ^"%s^") (access ^"%s^") (address ^"%s^")", name, get_user_userid(id), authid, AuthData, sflags, ip)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result |= 1
|
||||||
|
|
||||||
|
if (Flags & FLAG_KICK) {
|
||||||
|
result |= 2
|
||||||
|
log_amx("Login: ^"%s<%d><%s><>^" kicked due to invalid password (account ^"%s^") (address ^"%s^")", name, get_user_userid(id), authid, AuthData, ip)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (get_pcvar_float(amx_mode) == 2.0)
|
||||||
|
result |= 2
|
||||||
|
else {
|
||||||
|
new defaccess[32]
|
||||||
|
|
||||||
|
get_pcvar_string(amx_default_access, defaccess, charsmax(defaccess))
|
||||||
|
|
||||||
|
if (!strlen(defaccess))
|
||||||
|
copy(defaccess, charsmax(defaccess), "z")
|
||||||
|
|
||||||
|
new idefaccess = read_flags(defaccess)
|
||||||
|
|
||||||
|
if (idefaccess)
|
||||||
|
result |= 8
|
||||||
|
set_user_flags(id, idefaccess)
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
accessUser(id, name[] = "") {
|
||||||
|
remove_user_flags(id)
|
||||||
|
|
||||||
|
new userip[32], userauthid[32], password[32], passfield[32], username[MAX_NAME_LENGTH]
|
||||||
|
|
||||||
|
get_user_ip(id, userip, charsmax(userip), 1)
|
||||||
|
get_user_authid(id, userauthid, charsmax(userauthid))
|
||||||
|
|
||||||
|
if (name[0])
|
||||||
|
copy(username, charsmax(username), name)
|
||||||
|
else
|
||||||
|
get_user_name(id, username, charsmax(username))
|
||||||
|
|
||||||
|
get_pcvar_string(amx_password_field, passfield, charsmax(passfield))
|
||||||
|
get_user_info(id, passfield, password, charsmax(password))
|
||||||
|
|
||||||
|
new result = getAccess(id, username, userauthid, userip, password)
|
||||||
|
|
||||||
|
if (result & 1)
|
||||||
|
engclient_print(id, engprint_console, "* %L", id, "INV_PAS")
|
||||||
|
|
||||||
|
if (result & 2) {
|
||||||
|
server_cmd("kick #%d ^"%L^"", get_user_userid(id), id, "NO_ENTRY")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result & 4) {
|
||||||
|
engclient_print(id, engprint_console, "* %L", id, "PAS_ACC")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result & 8) {
|
||||||
|
engclient_print(id, engprint_console, "* %L", id, "PRIV_SET")
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
|
public client_infochanged(id) {
|
||||||
|
if (!is_user_connected(id) || !get_pcvar_num(amx_mode))
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
|
||||||
|
new newname[MAX_NAME_LENGTH], oldname[MAX_NAME_LENGTH]
|
||||||
|
|
||||||
|
get_user_name(id, oldname, charsmax(oldname))
|
||||||
|
get_user_info(id, "name", newname, charsmax(newname))
|
||||||
|
|
||||||
|
if (g_CaseSensitiveName[id]) {
|
||||||
|
if (!equal(newname, oldname))
|
||||||
|
accessUser(id, newname)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (!equali(newname, oldname))
|
||||||
|
accessUser(id, newname)
|
||||||
|
}
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
|
public client_authorized(id)
|
||||||
|
return get_pcvar_num(amx_mode) ? accessUser(id) : PLUGIN_CONTINUE
|
||||||
|
|
||||||
|
public client_putinserver(id) {
|
||||||
|
if (!is_dedicated_server() && id == 1)
|
||||||
|
return get_pcvar_num(amx_mode) ? accessUser(id) : PLUGIN_CONTINUE
|
||||||
|
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
424
amxmodx/scripting/adminchat.sma
Executable file
424
amxmodx/scripting/adminchat.sma
Executable file
|
@ -0,0 +1,424 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Admin Chat Plugin
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
#include <amxmisc>
|
||||||
|
|
||||||
|
new g_msgChannel
|
||||||
|
|
||||||
|
#define MAX_CLR 10
|
||||||
|
|
||||||
|
new g_Colors[MAX_CLR][] = {"COL_WHITE", "COL_RED", "COL_GREEN", "COL_BLUE", "COL_YELLOW", "COL_MAGENTA", "COL_CYAN", "COL_ORANGE", "COL_OCEAN", "COL_MAROON"}
|
||||||
|
new g_Values[MAX_CLR][] = {{255, 255, 255}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}, {255, 255, 0}, {255, 0, 255}, {0, 255, 255}, {227, 96, 8}, {45, 89, 116}, {103, 44, 38}}
|
||||||
|
new Float:g_Pos[4][] = {{0.0, 0.0}, {0.05, 0.55}, {-1.0, 0.2}, {-1.0, 0.7}}
|
||||||
|
|
||||||
|
new amx_show_activity;
|
||||||
|
new amx_flood_time;
|
||||||
|
new g_AdminChatFlag = ADMIN_CHAT;
|
||||||
|
|
||||||
|
new Float:g_Flooding[MAX_PLAYERS + 1] = {0.0, ...}
|
||||||
|
new g_Flood[MAX_PLAYERS + 1] = {0, ...}
|
||||||
|
|
||||||
|
public plugin_init()
|
||||||
|
{
|
||||||
|
new admin_chat_id
|
||||||
|
|
||||||
|
register_plugin("Admin Chat", AMXX_VERSION_STR, "AMXX Dev Team")
|
||||||
|
register_dictionary("adminchat.txt")
|
||||||
|
register_dictionary("common.txt")
|
||||||
|
register_dictionary("antiflood.txt")
|
||||||
|
register_clcmd("say", "cmdSayChat", ADMIN_CHAT, "@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message", 1) // forces FlagManager as it is a say command
|
||||||
|
register_clcmd("say_team", "cmdSayAdmin", 0, "@<text> - displays message to admins")
|
||||||
|
register_concmd("amx_say", "cmdSay", ADMIN_CHAT, "<message> - sends message to all players")
|
||||||
|
admin_chat_id = register_concmd("amx_chat", "cmdChat", ADMIN_CHAT, "<message> - sends message to admins")
|
||||||
|
register_concmd("amx_psay", "cmdPsay", ADMIN_CHAT, "<name or #userid> <message> - sends private message")
|
||||||
|
register_concmd("amx_tsay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends left side hud message to all players")
|
||||||
|
register_concmd("amx_csay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends center hud message to all players")
|
||||||
|
|
||||||
|
amx_show_activity = get_cvar_pointer("amx_show_activity");
|
||||||
|
|
||||||
|
if (amx_show_activity == 0)
|
||||||
|
{
|
||||||
|
amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
new str[1]
|
||||||
|
get_concmd(admin_chat_id, str, 0, g_AdminChatFlag, str, 0, -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
public plugin_cfg()
|
||||||
|
{
|
||||||
|
// check if cvar amx_flood_time exists (created by antiflood plugin)
|
||||||
|
|
||||||
|
amx_flood_time = get_cvar_pointer("amx_flood_time");
|
||||||
|
|
||||||
|
if( !amx_flood_time )
|
||||||
|
{
|
||||||
|
// else create it
|
||||||
|
amx_flood_time = register_cvar("amx_flood_time", "0.75");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdSayChat(id, level)
|
||||||
|
{
|
||||||
|
if (!access(id, level))
|
||||||
|
{
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
|
new said[6], i = 0
|
||||||
|
read_argv(1, said, charsmax(said))
|
||||||
|
|
||||||
|
while (said[i] == '@')
|
||||||
|
{
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!i || i > 3)
|
||||||
|
{
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
|
new message[192], a = 0
|
||||||
|
read_args(message, charsmax(message))
|
||||||
|
remove_quotes(message)
|
||||||
|
|
||||||
|
switch (said[i])
|
||||||
|
{
|
||||||
|
case 'r': a = 1
|
||||||
|
case 'g': a = 2
|
||||||
|
case 'b': a = 3
|
||||||
|
case 'y': a = 4
|
||||||
|
case 'm': a = 5
|
||||||
|
case 'c': a = 6
|
||||||
|
case 'o': a = 7
|
||||||
|
}
|
||||||
|
|
||||||
|
new n, s = i
|
||||||
|
if (a)
|
||||||
|
{
|
||||||
|
n++
|
||||||
|
s++
|
||||||
|
}
|
||||||
|
while (said[s] && isspace(said[s]))
|
||||||
|
{
|
||||||
|
n++
|
||||||
|
s++
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
new name[MAX_NAME_LENGTH], authid[32], userid
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
userid = get_user_userid(id)
|
||||||
|
|
||||||
|
log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^"", name, userid, authid, message[i + n])
|
||||||
|
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")", name, userid, authid, message[i + n], "en", g_Colors[a])
|
||||||
|
|
||||||
|
if (++g_msgChannel > 6 || g_msgChannel < 3)
|
||||||
|
{
|
||||||
|
g_msgChannel = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0
|
||||||
|
|
||||||
|
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||||
|
|
||||||
|
switch (get_pcvar_num(amx_show_activity))
|
||||||
|
{
|
||||||
|
case 3, 4:
|
||||||
|
{
|
||||||
|
new players[MAX_PLAYERS], plrsnum, pl
|
||||||
|
get_players(players, plrsnum, "ch")
|
||||||
|
for(new j; j<plrsnum; j++)
|
||||||
|
{
|
||||||
|
pl = players[j]
|
||||||
|
|
||||||
|
if (is_user_admin(pl))
|
||||||
|
{
|
||||||
|
show_hudmessage(pl, "%s : %s", name, message[i + n])
|
||||||
|
client_print(pl, print_notify, "%s : %s", name, message[i + n])
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
show_hudmessage(pl, "%s", message[i + n])
|
||||||
|
client_print(pl, print_notify, "%s", message[i + n])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
show_hudmessage(0, "%s : %s", name, message[i + n])
|
||||||
|
client_print(0, print_notify, "%s : %s", name, message[i + n])
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
show_hudmessage(0, "%s", message[i + n])
|
||||||
|
client_print(0, print_notify, "%s", message[i + n])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdSayAdmin(id)
|
||||||
|
{
|
||||||
|
new said[2]
|
||||||
|
read_argv(1, said, charsmax(said))
|
||||||
|
|
||||||
|
if (said[0] != '@')
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
|
||||||
|
new Float:maxChat = get_pcvar_float(amx_flood_time)
|
||||||
|
|
||||||
|
if (maxChat)
|
||||||
|
{
|
||||||
|
new Float:nexTime = get_gametime()
|
||||||
|
|
||||||
|
if (g_Flooding[id] > nexTime)
|
||||||
|
{
|
||||||
|
if (g_Flood[id] >= 3)
|
||||||
|
{
|
||||||
|
client_print(id, print_notify, "** %L **", id, "STOP_FLOOD")
|
||||||
|
g_Flooding[id] = nexTime + maxChat + 3.0
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
g_Flood[id]++
|
||||||
|
}
|
||||||
|
else if (g_Flood[id])
|
||||||
|
{
|
||||||
|
g_Flood[id]--
|
||||||
|
}
|
||||||
|
|
||||||
|
g_Flooding[id] = nexTime + maxChat
|
||||||
|
}
|
||||||
|
|
||||||
|
new message[192], name[MAX_NAME_LENGTH], authid[32], userid
|
||||||
|
new players[MAX_PLAYERS], inum, pl
|
||||||
|
|
||||||
|
read_args(message, charsmax(message))
|
||||||
|
remove_quotes(message)
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
userid = get_user_userid(id)
|
||||||
|
|
||||||
|
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message[1])
|
||||||
|
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message[1])
|
||||||
|
|
||||||
|
get_players(players, inum, "ch")
|
||||||
|
|
||||||
|
for (new bool:is_sender_admin = is_user_admin(id) != 0, i = 0; i < inum; ++i)
|
||||||
|
{
|
||||||
|
pl = players[i]
|
||||||
|
|
||||||
|
if (pl == id || get_user_flags(pl) & g_AdminChatFlag)
|
||||||
|
{
|
||||||
|
client_print(pl, print_chat, "(%l) %s : %s", is_sender_admin ? "ADMIN" : "PLAYER", name, message[1])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdChat(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 2))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new message[192]
|
||||||
|
|
||||||
|
read_args(message, charsmax(message))
|
||||||
|
remove_quotes(message)
|
||||||
|
|
||||||
|
if (!message[0])
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new name[MAX_NAME_LENGTH], players[MAX_PLAYERS], inum, authid[32], userid, pl
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
userid = get_user_userid(id)
|
||||||
|
get_players(players, inum, "ch")
|
||||||
|
|
||||||
|
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message)
|
||||||
|
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message)
|
||||||
|
|
||||||
|
format(message, charsmax(message), "(ADMINS) %s : %s", name, message)
|
||||||
|
console_print(id, "%s", message)
|
||||||
|
|
||||||
|
for (new i = 0; i < inum; ++i)
|
||||||
|
{
|
||||||
|
pl = players[i]
|
||||||
|
if (access(pl, g_AdminChatFlag))
|
||||||
|
client_print(pl, print_chat, "%s", message)
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdSay(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 2))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new message[192], name[MAX_NAME_LENGTH], authid[32], userid
|
||||||
|
|
||||||
|
read_args(message, charsmax(message))
|
||||||
|
remove_quotes(message)
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
userid = get_user_userid(id)
|
||||||
|
client_print(0, print_chat, "%L", LANG_PLAYER, "PRINT_ALL", name, message)
|
||||||
|
console_print(id, "%L", LANG_PLAYER, "PRINT_ALL", name, message)
|
||||||
|
|
||||||
|
log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^"", name, userid, authid, message)
|
||||||
|
log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")", name, userid, authid, message)
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdPsay(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 3))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new name[MAX_NAME_LENGTH]
|
||||||
|
read_argv(1, name, charsmax(name))
|
||||||
|
new priv = cmd_target(id, name, 0)
|
||||||
|
|
||||||
|
if (!priv)
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new length = strlen(name) + 1
|
||||||
|
|
||||||
|
new message[192], name2[MAX_NAME_LENGTH], authid[32], authid2[32], userid, userid2
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name2, charsmax(name2))
|
||||||
|
userid = get_user_userid(id)
|
||||||
|
read_args(message, charsmax(message))
|
||||||
|
|
||||||
|
if (message[0] == '"' && message[length] == '"') // HLSW fix
|
||||||
|
{
|
||||||
|
message[0] = ' '
|
||||||
|
message[length] = ' '
|
||||||
|
length += 2
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_quotes(message[length])
|
||||||
|
get_user_name(priv, name, charsmax(name))
|
||||||
|
|
||||||
|
if (id && id != priv)
|
||||||
|
client_print(id, print_chat, "(%s) %s : %s", name, name2, message[length])
|
||||||
|
|
||||||
|
client_print(priv, print_chat, "(%s) %s : %s", name, name2, message[length])
|
||||||
|
console_print(id, "(%s) %s : %s", name, name2, message[length])
|
||||||
|
get_user_authid(priv, authid2, charsmax(authid2))
|
||||||
|
userid2 = get_user_userid(priv)
|
||||||
|
|
||||||
|
log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^"", name2, userid, authid, name, userid2, authid2, message[length])
|
||||||
|
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")", name2, userid, authid, name, userid2, authid2, message[length])
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdTsay(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 3))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new cmd[16], color[16], color2[16], message[192], name[MAX_NAME_LENGTH], authid[32], userid = 0
|
||||||
|
|
||||||
|
read_argv(0, cmd, charsmax(cmd))
|
||||||
|
new bool:tsay = (tolower(cmd[4]) == 't')
|
||||||
|
|
||||||
|
read_args(message, charsmax(message))
|
||||||
|
remove_quotes(message)
|
||||||
|
parse(message, color, charsmax(color))
|
||||||
|
|
||||||
|
new found = 0, a = 0
|
||||||
|
new lang[3], langnum = get_langsnum()
|
||||||
|
|
||||||
|
for (new i = 0; i < MAX_CLR; ++i)
|
||||||
|
{
|
||||||
|
for (new j = 0; j < langnum; j++)
|
||||||
|
{
|
||||||
|
get_lang(j, lang)
|
||||||
|
formatex(color2, charsmax(color2), "%L", lang, g_Colors[i])
|
||||||
|
|
||||||
|
if (equali(color, color2))
|
||||||
|
{
|
||||||
|
a = i
|
||||||
|
found = 1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found == 1)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
new length = found ? (strlen(color) + 1) : 0
|
||||||
|
|
||||||
|
if (++g_msgChannel > 6 || g_msgChannel < 3)
|
||||||
|
g_msgChannel = 3
|
||||||
|
|
||||||
|
new Float:verpos = (tsay ? 0.55 : 0.1) + float(g_msgChannel) / 35.0
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
userid = get_user_userid(id)
|
||||||
|
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay ? 0.05 : -1.0, verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||||
|
|
||||||
|
switch (get_pcvar_num(amx_show_activity))
|
||||||
|
{
|
||||||
|
case 3, 4:
|
||||||
|
{
|
||||||
|
new players[MAX_PLAYERS], plrsnum, pl
|
||||||
|
get_players(players, plrsnum, "ch")
|
||||||
|
for(new i; i<plrsnum; i++)
|
||||||
|
{
|
||||||
|
pl = players[i]
|
||||||
|
|
||||||
|
if (is_user_admin(pl))
|
||||||
|
{
|
||||||
|
show_hudmessage(pl, "%s : %s", name, message[length])
|
||||||
|
client_print(pl, print_notify, "%s : %s", name, message[length])
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
show_hudmessage(pl, "%s", message[length])
|
||||||
|
client_print(pl, print_notify, "%s", message[length])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console_print(id, "%s : %s", name, message[length])
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
show_hudmessage(0, "%s : %s", name, message[length])
|
||||||
|
client_print(0, print_notify, "%s : %s", name, message[length])
|
||||||
|
console_print(id, "%s : %s", name, message[length])
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
show_hudmessage(0, "%s", message[length])
|
||||||
|
client_print(0, print_notify, "%s", message[length])
|
||||||
|
console_print(id, "%s", message[length])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^"", name, userid, authid, cmd[4], message[length])
|
||||||
|
log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")", name, userid, authid, cmd, message[length], color2)
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
1377
amxmodx/scripting/admincmd.sma
Executable file
1377
amxmodx/scripting/admincmd.sma
Executable file
File diff suppressed because it is too large
Load Diff
198
amxmodx/scripting/adminhelp.sma
Executable file
198
amxmodx/scripting/adminhelp.sma
Executable file
|
@ -0,0 +1,198 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Admin Help Plugin
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
|
||||||
|
const MaxMapLength = 32;
|
||||||
|
const MaxDefaultEntries = 10;
|
||||||
|
const MaxCommandLength = 32;
|
||||||
|
const MaxCommandInfoLength = 128;
|
||||||
|
const DefaultMsgTime = 15;
|
||||||
|
|
||||||
|
new const HelpCommand[] = "amx_help";
|
||||||
|
new const SearchCommand[] = "amx_searchcmd";
|
||||||
|
|
||||||
|
new CvarDisplayClientMessage;
|
||||||
|
new CvarDisplayMessageTime;
|
||||||
|
new CvarHelpAmount;
|
||||||
|
|
||||||
|
new CvarNextmap[MaxMapLength];
|
||||||
|
new Float:CvarTimeLimit;
|
||||||
|
|
||||||
|
new bool:DisplayClientMessage[MAX_PLAYERS + 1 char];
|
||||||
|
|
||||||
|
public plugin_init()
|
||||||
|
{
|
||||||
|
register_plugin("Admin Help", AMXX_VERSION_STR, "AMXX Dev Team");
|
||||||
|
register_dictionary("adminhelp.txt");
|
||||||
|
|
||||||
|
register_concmd(HelpCommand , "@ConsoleCommand_Help" , ADMIN_ALL, "HELP_CMD_INFO" , .info_ml = true);
|
||||||
|
register_concmd(SearchCommand, "@ConsoleCommand_Search", ADMIN_ALL, "SEARCH_CMD_INFO", .info_ml = true);
|
||||||
|
|
||||||
|
bind_pcvar_num(create_cvar("amx_help_display_msg" , "1" , .has_min = true, .min_val = 0.0, .has_max = true, .max_val = 1.0), CvarDisplayClientMessage);
|
||||||
|
bind_pcvar_num(create_cvar("amx_help_display_msg_time", "15", .has_min = true, .min_val = 0.0), CvarDisplayMessageTime);
|
||||||
|
bind_pcvar_num(create_cvar("amx_help_amount_per_page" , "10", .has_min = true, .min_val = 0.0), CvarHelpAmount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OnConfigsExecuted()
|
||||||
|
{
|
||||||
|
new const pointer = get_cvar_pointer("amx_nextmap");
|
||||||
|
|
||||||
|
if (pointer)
|
||||||
|
{
|
||||||
|
bind_pcvar_string(pointer, CvarNextmap, charsmax(CvarNextmap));
|
||||||
|
}
|
||||||
|
|
||||||
|
bind_pcvar_float(get_cvar_pointer("mp_timelimit"), CvarTimeLimit);
|
||||||
|
}
|
||||||
|
|
||||||
|
public client_putinserver(id)
|
||||||
|
{
|
||||||
|
if (CvarDisplayClientMessage > 0 && !is_user_bot(id))
|
||||||
|
{
|
||||||
|
DisplayClientMessage{id} = true;
|
||||||
|
|
||||||
|
new Float:messageTime = float(CvarDisplayMessageTime <= 0 ? DefaultMsgTime : CvarDisplayMessageTime);
|
||||||
|
set_task(messageTime, "@Task_DisplayMessage", id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public client_disconnected(id)
|
||||||
|
{
|
||||||
|
if (DisplayClientMessage{id})
|
||||||
|
{
|
||||||
|
DisplayClientMessage{id} = false;
|
||||||
|
remove_task(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConsoleCommand_Search(id, level, cid)
|
||||||
|
{
|
||||||
|
new entry[MaxCommandLength];
|
||||||
|
read_argv(1, entry, charsmax(entry));
|
||||||
|
|
||||||
|
return ProcessHelp(id, .start_argindex = 2, .do_search = true, .main_command = SearchCommand, .search = entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConsoleCommand_Help(id, level, cid)
|
||||||
|
{
|
||||||
|
return ProcessHelp(id, .start_argindex = 1, .do_search = false, .main_command = HelpCommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
ProcessHelp(id, start_argindex, bool:do_search, const main_command[], const search[] = "")
|
||||||
|
{
|
||||||
|
new user_flags = get_user_flags(id);
|
||||||
|
|
||||||
|
// HACK: ADMIN_ADMIN is never set as a user's actual flags, so those types of commands never show
|
||||||
|
if (user_flags > 0 && !(user_flags & ADMIN_USER))
|
||||||
|
{
|
||||||
|
user_flags |= ADMIN_ADMIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
new clcmdsnum = get_concmdsnum(user_flags, id);
|
||||||
|
|
||||||
|
if (CvarHelpAmount <= 0)
|
||||||
|
{
|
||||||
|
CvarHelpAmount = MaxDefaultEntries;
|
||||||
|
}
|
||||||
|
|
||||||
|
new start = clamp(read_argv_int(start_argindex), .min = 1, .max = clcmdsnum) - 1; // Zero-based list;
|
||||||
|
new amount = !id ? read_argv_int(start_argindex + 1) : CvarHelpAmount;
|
||||||
|
new end = min(start + (amount > 0 ? amount : CvarHelpAmount), clcmdsnum);
|
||||||
|
|
||||||
|
console_print(id, "^n----- %l -----", "HELP_COMS");
|
||||||
|
|
||||||
|
new info[MaxCommandInfoLength];
|
||||||
|
new command[MaxCommandLength];
|
||||||
|
new command_flags;
|
||||||
|
new bool:is_info_ml;
|
||||||
|
new entries_found;
|
||||||
|
new total_entries;
|
||||||
|
new index;
|
||||||
|
|
||||||
|
if (do_search)
|
||||||
|
{
|
||||||
|
for (index = 0; index < clcmdsnum; ++index)
|
||||||
|
{
|
||||||
|
get_concmd(index, command, charsmax(command), command_flags, info, charsmax(info), user_flags, id, is_info_ml);
|
||||||
|
|
||||||
|
if (containi(command, search) != -1 && ++entries_found > start && (total_entries = entries_found) <= end)
|
||||||
|
{
|
||||||
|
if (is_info_ml)
|
||||||
|
{
|
||||||
|
LookupLangKey(info, charsmax(info), info, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
console_print(id, "%3d: %s %s", entries_found, command, info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!entries_found || entries_found > total_entries)
|
||||||
|
{
|
||||||
|
console_print(id, "%l", "NO_MATCHING_RESULTS");
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
index = entries_found;
|
||||||
|
clcmdsnum = total_entries;
|
||||||
|
end = min(end, clcmdsnum);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (index = start; index < end; ++index)
|
||||||
|
{
|
||||||
|
get_concmd(index, command, charsmax(command), command_flags, info, charsmax(info), user_flags, id, is_info_ml);
|
||||||
|
|
||||||
|
if (is_info_ml)
|
||||||
|
{
|
||||||
|
LookupLangKey(info, charsmax(info), info, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
console_print(id, "%3d: %s %s", index + 1, command, info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console_print(id, "----- %l -----", "HELP_ENTRIES", start + 1, end, clcmdsnum);
|
||||||
|
|
||||||
|
formatex(command, charsmax(command), "%s%c%s", main_command, do_search ? " " : "", search);
|
||||||
|
|
||||||
|
if (end < clcmdsnum)
|
||||||
|
{
|
||||||
|
console_print(id, "----- %l -----", "HELP_USE_MORE", command, end + 1);
|
||||||
|
}
|
||||||
|
else if (start || index != clcmdsnum)
|
||||||
|
{
|
||||||
|
console_print(id, "----- %l -----", "HELP_USE_BEGIN", command);
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Task_DisplayMessage(id)
|
||||||
|
{
|
||||||
|
client_print(id, print_chat, "%l", "TYPE_HELP", HelpCommand, SearchCommand);
|
||||||
|
|
||||||
|
if (CvarTimeLimit > 0.0)
|
||||||
|
{
|
||||||
|
new timeleft = get_timeleft();
|
||||||
|
|
||||||
|
if (timeleft > 0)
|
||||||
|
{
|
||||||
|
client_print(id, print_chat, "%l", "TIME_INFO_1", timeleft / 60, timeleft % 60, CvarNextmap);
|
||||||
|
}
|
||||||
|
else if (CvarNextmap[0] != EOS)
|
||||||
|
{
|
||||||
|
client_print(id, print_chat, "%l", "TIME_INFO_2", CvarNextmap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
110
amxmodx/scripting/adminslots.sma
Executable file
110
amxmodx/scripting/adminslots.sma
Executable file
|
@ -0,0 +1,110 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Slots Reservation Plugin
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
#include <amxmisc>
|
||||||
|
|
||||||
|
new CvarReservation;
|
||||||
|
new CvarHideSlots;
|
||||||
|
|
||||||
|
new CvarHandleMaxVisiblePlayers;
|
||||||
|
|
||||||
|
public plugin_init()
|
||||||
|
{
|
||||||
|
register_plugin("Slots Reservation", AMXX_VERSION_STR, "AMXX Dev Team");
|
||||||
|
|
||||||
|
register_dictionary("adminslots.txt");
|
||||||
|
register_dictionary("common.txt");
|
||||||
|
|
||||||
|
hook_cvar_change(create_cvar("amx_reservation", "0", FCVAR_PROTECTED, fmt("%L", LANG_SERVER, "CVAR_RESERVATION"), .has_min = true, .min_val = 0.0, .has_max = true, .max_val = float(MaxClients - 1)), "@OnReservationChange");
|
||||||
|
hook_cvar_change(create_cvar("amx_hideslots" , "0", FCVAR_NONE , fmt("%L", LANG_SERVER, "CVAR_HIDESLOTS") , .has_min = true, .min_val = 0.0, .has_max = true, .max_val = 1.0), "@OnHideSlotsChange");
|
||||||
|
|
||||||
|
CvarHandleMaxVisiblePlayers = get_cvar_pointer("sv_visiblemaxplayers");
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnReservationChange(const handle, const oldValue[], const newValue[])
|
||||||
|
{
|
||||||
|
CvarReservation = strtol(newValue);
|
||||||
|
|
||||||
|
setVisibleSlots();
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnHideSlotsChange(const handle, const oldValue[], const newValue[])
|
||||||
|
{
|
||||||
|
CvarHideSlots = strtol(newValue);
|
||||||
|
|
||||||
|
setVisibleSlots();
|
||||||
|
}
|
||||||
|
|
||||||
|
public client_authorized(id)
|
||||||
|
{
|
||||||
|
setVisibleSlots(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public client_remove(id)
|
||||||
|
{
|
||||||
|
setVisibleSlots();
|
||||||
|
}
|
||||||
|
|
||||||
|
setVisibleSlots(const playerId = 0)
|
||||||
|
{
|
||||||
|
if ((playerId == 0 && !CvarHideSlots) || !CvarReservation)
|
||||||
|
{
|
||||||
|
if (get_pcvar_num(CvarHandleMaxVisiblePlayers) > 0)
|
||||||
|
{
|
||||||
|
resetVisibleSlots(MaxClients);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
new const playersCount = get_playersnum_ex(GetPlayers_IncludeConnecting);
|
||||||
|
new const freeVisibleSlots = MaxClients - CvarReservation;
|
||||||
|
|
||||||
|
if (playerId != 0)
|
||||||
|
{
|
||||||
|
if (playersCount > freeVisibleSlots && !access(playerId, ADMIN_RESERVATION))
|
||||||
|
{
|
||||||
|
server_cmd("kick #%d ^"%L^"", get_user_userid(playerId), playerId, "DROPPED_RES");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CvarHideSlots)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new maxVisiblePlayers = playersCount + 1;
|
||||||
|
|
||||||
|
if (playersCount == MaxClients)
|
||||||
|
{
|
||||||
|
maxVisiblePlayers = MaxClients;
|
||||||
|
}
|
||||||
|
else if (playersCount < freeVisibleSlots)
|
||||||
|
{
|
||||||
|
maxVisiblePlayers = freeVisibleSlots;
|
||||||
|
}
|
||||||
|
|
||||||
|
resetVisibleSlots(maxVisiblePlayers);
|
||||||
|
}
|
||||||
|
|
||||||
|
resetVisibleSlots(value)
|
||||||
|
{
|
||||||
|
if (value == MaxClients)
|
||||||
|
{
|
||||||
|
value = -1; // Default sv_visiblemaxplayers value.
|
||||||
|
}
|
||||||
|
|
||||||
|
set_pcvar_num(CvarHandleMaxVisiblePlayers, value);
|
||||||
|
}
|
549
amxmodx/scripting/adminvote.sma
Executable file
549
amxmodx/scripting/adminvote.sma
Executable file
|
@ -0,0 +1,549 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Admin Votes Plugin
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
#include <amxmisc>
|
||||||
|
|
||||||
|
|
||||||
|
new g_Answer[128]
|
||||||
|
new g_optionName[4][64]
|
||||||
|
new g_voteCount[4]
|
||||||
|
new g_validMaps
|
||||||
|
new g_yesNoVote
|
||||||
|
new g_coloredMenus
|
||||||
|
new g_voteCaller
|
||||||
|
new g_Execute[256]
|
||||||
|
new g_execLen
|
||||||
|
|
||||||
|
new bool:g_execResult
|
||||||
|
new Float:g_voteRatio
|
||||||
|
|
||||||
|
public plugin_init()
|
||||||
|
{
|
||||||
|
register_plugin("Admin Votes", AMXX_VERSION_STR, "AMXX Dev Team")
|
||||||
|
register_dictionary("adminvote.txt")
|
||||||
|
register_dictionary("common.txt")
|
||||||
|
register_dictionary("mapsmenu.txt")
|
||||||
|
register_menucmd(register_menuid("Change map to "), MENU_KEY_1|MENU_KEY_2, "voteCount")
|
||||||
|
register_menucmd(register_menuid("Choose map: "), MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4, "voteCount")
|
||||||
|
register_menucmd(register_menuid("Kick "), MENU_KEY_1|MENU_KEY_2, "voteCount")
|
||||||
|
register_menucmd(register_menuid("Ban "), MENU_KEY_1|MENU_KEY_2, "voteCount")
|
||||||
|
register_menucmd(register_menuid("Vote: "), MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4, "voteCount")
|
||||||
|
register_menucmd(register_menuid("The result: "), MENU_KEY_1|MENU_KEY_2, "actionResult")
|
||||||
|
register_concmd("amx_votemap", "cmdVoteMap", ADMIN_VOTE, "<map> [map] [map] [map]")
|
||||||
|
register_concmd("amx_votekick", "cmdVoteKickBan", ADMIN_VOTE, "<name or #userid>")
|
||||||
|
register_concmd("amx_voteban", "cmdVoteKickBan", ADMIN_VOTE, "<name or #userid>")
|
||||||
|
register_concmd("amx_vote", "cmdVote", ADMIN_VOTE, "<question> <answer#1> <answer#2>")
|
||||||
|
register_concmd("amx_cancelvote", "cmdCancelVote", ADMIN_VOTE, "- cancels last vote")
|
||||||
|
|
||||||
|
g_coloredMenus = colored_menus()
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdCancelVote(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 0))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
if (task_exists(99889988, 1))
|
||||||
|
{
|
||||||
|
new authid[32], name[MAX_NAME_LENGTH]
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
log_amx("Vote: ^"%s<%d><%s><>^" cancel vote session", name, get_user_userid(id), authid)
|
||||||
|
|
||||||
|
new msg[256];
|
||||||
|
for (new i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i) && !is_user_bot(i))
|
||||||
|
{
|
||||||
|
// HACK: ADMIN_CANC_VOTE_{1,2} keys were designed very poorly. Remove all : and %s in it.
|
||||||
|
LookupLangKey(msg, charsmax(msg), "ADMIN_CANC_VOTE_1", i);
|
||||||
|
replace_all(msg, charsmax(msg), "%s", "");
|
||||||
|
replace_all(msg, charsmax(msg), ":", "");
|
||||||
|
trim(msg);
|
||||||
|
show_activity_id(i, id, name, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console_print(id, "%L", id, "VOTING_CANC")
|
||||||
|
client_print(0,print_chat,"%L",LANG_PLAYER,"VOTING_CANC")
|
||||||
|
remove_task(99889988, 1)
|
||||||
|
set_cvar_float("amx_last_voting", get_gametime())
|
||||||
|
}
|
||||||
|
else
|
||||||
|
console_print(id, "%L", id, "NO_VOTE_CANC")
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public delayedExec(cmd[])
|
||||||
|
server_cmd("%s", cmd)
|
||||||
|
|
||||||
|
public autoRefuse()
|
||||||
|
{
|
||||||
|
log_amx("Vote: %L", "en", "RES_REF")
|
||||||
|
client_print(0, print_chat, "%L", LANG_PLAYER, "RES_REF")
|
||||||
|
}
|
||||||
|
|
||||||
|
public actionResult(id, key)
|
||||||
|
{
|
||||||
|
remove_task(4545454)
|
||||||
|
|
||||||
|
switch (key)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
set_task(2.0, "delayedExec", 0, g_Execute, g_execLen)
|
||||||
|
log_amx("Vote: %L", "en", "RES_ACCEPTED")
|
||||||
|
client_print(0, print_chat, "%L", LANG_PLAYER, "RES_ACCEPTED")
|
||||||
|
}
|
||||||
|
case 1: autoRefuse()
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public checkVotes()
|
||||||
|
{
|
||||||
|
new best = 0
|
||||||
|
|
||||||
|
if (!g_yesNoVote)
|
||||||
|
{
|
||||||
|
for (new a = 0; a < 4; ++a)
|
||||||
|
if (g_voteCount[a] > g_voteCount[best])
|
||||||
|
|
||||||
|
best = a
|
||||||
|
}
|
||||||
|
|
||||||
|
new votesNum = g_voteCount[0] + g_voteCount[1] + g_voteCount[2] + g_voteCount[3]
|
||||||
|
new iRatio = votesNum ? floatround(g_voteRatio * float(votesNum), floatround_ceil) : 1
|
||||||
|
new iResult = g_voteCount[best]
|
||||||
|
new players[MAX_PLAYERS], pnum, i
|
||||||
|
|
||||||
|
get_players(players, pnum, "c")
|
||||||
|
|
||||||
|
if (iResult < iRatio)
|
||||||
|
{
|
||||||
|
new lVotingFailed[64]
|
||||||
|
|
||||||
|
for (i = 0; i < pnum; i++)
|
||||||
|
{
|
||||||
|
format(lVotingFailed, 63, "%L", players[i], "VOTING_FAILED")
|
||||||
|
if (g_yesNoVote)
|
||||||
|
client_print(players[i], print_chat, "%L", players[i], "VOTING_RES_1", lVotingFailed, g_voteCount[0], g_voteCount[1], iRatio)
|
||||||
|
else
|
||||||
|
client_print(players[i], print_chat, "%L", players[i], "VOTING_RES_2", lVotingFailed, iResult, iRatio)
|
||||||
|
}
|
||||||
|
|
||||||
|
format(lVotingFailed, 63, "%L", "en", "VOTING_FAILED")
|
||||||
|
log_amx("Vote: %s (got ^"%d^") (needed ^"%d^")", lVotingFailed, iResult, iRatio)
|
||||||
|
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
|
g_execLen = format(g_Execute, charsmax(g_Execute), g_Answer, g_optionName[best]) + 1
|
||||||
|
|
||||||
|
if (g_execResult)
|
||||||
|
{
|
||||||
|
g_execResult = false
|
||||||
|
|
||||||
|
if (is_user_connected(g_voteCaller))
|
||||||
|
{
|
||||||
|
new menuBody[512], lTheResult[32], lYes[16], lNo[16]
|
||||||
|
|
||||||
|
format(lTheResult, charsmax(lTheResult), "%L", g_voteCaller, "THE_RESULT")
|
||||||
|
format(lYes, charsmax(lYes), "%L", g_voteCaller, "YES")
|
||||||
|
format(lNo, charsmax(lNo), "%L", g_voteCaller, "NO")
|
||||||
|
|
||||||
|
new len = format(menuBody, charsmax(menuBody), g_coloredMenus ? "\y%s: \w%s^n^n" : "%s: %s^n^n", lTheResult, g_Execute)
|
||||||
|
|
||||||
|
len += format(menuBody[len], charsmax(menuBody) - len, g_coloredMenus ? "\y%L^n\w" : "%L^n", g_voteCaller, "WANT_CONTINUE")
|
||||||
|
format(menuBody[len], charsmax(menuBody) - len, "^n1. %s^n2. %s", lYes, lNo)
|
||||||
|
show_menu(g_voteCaller, 0x03, menuBody, 10, "The result: ")
|
||||||
|
set_task(10.0, "autoRefuse", 4545454)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
set_task(2.0, "delayedExec", 0, g_Execute, g_execLen)
|
||||||
|
}
|
||||||
|
|
||||||
|
new lVotingSuccess[32]
|
||||||
|
|
||||||
|
for (i = 0; i < pnum; i++)
|
||||||
|
{
|
||||||
|
format(lVotingSuccess, charsmax(lVotingSuccess), "%L", players[i], "VOTING_SUCCESS")
|
||||||
|
client_print(players[i], print_chat, "%L", players[i], "VOTING_RES_3", lVotingSuccess, iResult, iRatio, g_Execute)
|
||||||
|
}
|
||||||
|
|
||||||
|
format(lVotingSuccess, charsmax(lVotingSuccess), "%L", "en", "VOTING_SUCCESS")
|
||||||
|
log_amx("Vote: %s (got ^"%d^") (needed ^"%d^") (result ^"%s^")", lVotingSuccess, iResult, iRatio, g_Execute)
|
||||||
|
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
|
public voteCount(id, key)
|
||||||
|
{
|
||||||
|
if (get_cvar_num("amx_vote_answers"))
|
||||||
|
{
|
||||||
|
new name[MAX_NAME_LENGTH]
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
|
||||||
|
if (g_yesNoVote)
|
||||||
|
client_print(0, print_chat, "%L", LANG_PLAYER, key ? "VOTED_AGAINST" : "VOTED_FOR", name)
|
||||||
|
else
|
||||||
|
client_print(0, print_chat, "%L", LANG_PLAYER, "VOTED_FOR_OPT", name, key + 1)
|
||||||
|
}
|
||||||
|
++g_voteCount[key]
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdVoteMap(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 2))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new Float:voting = get_cvar_float("amx_last_voting")
|
||||||
|
if (voting > get_gametime())
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "ALREADY_VOTING")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime())
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "VOTING_NOT_ALLOW")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
new argc = read_argc()
|
||||||
|
if (argc > 5) argc = 5
|
||||||
|
|
||||||
|
g_validMaps = 0
|
||||||
|
g_optionName[0][0] = 0
|
||||||
|
g_optionName[1][0] = 0
|
||||||
|
g_optionName[2][0] = 0
|
||||||
|
g_optionName[3][0] = 0
|
||||||
|
|
||||||
|
for (new i = 1; i < argc; ++i)
|
||||||
|
{
|
||||||
|
read_argv(i, g_optionName[g_validMaps], 31)
|
||||||
|
|
||||||
|
if (contain(g_optionName[g_validMaps], "..") != -1)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if (is_map_valid(g_optionName[g_validMaps]))
|
||||||
|
g_validMaps++
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_validMaps == 0)
|
||||||
|
{
|
||||||
|
new lMaps[16]
|
||||||
|
|
||||||
|
format(lMaps, charsmax(lMaps), "%L", id, (argc == 2) ? "MAP_IS" : "MAPS_ARE")
|
||||||
|
console_print(id, "%L", id, "GIVEN_NOT_VALID", lMaps)
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
new menu_msg[256], len = 0
|
||||||
|
new keys = 0
|
||||||
|
|
||||||
|
if (g_validMaps > 1)
|
||||||
|
{
|
||||||
|
keys = MENU_KEY_0
|
||||||
|
len = format(menu_msg, charsmax(menu_msg), g_coloredMenus ? "\y%L: \w^n^n" : "%L: ^n^n", LANG_SERVER, "CHOOSE_MAP")
|
||||||
|
new temp[128]
|
||||||
|
|
||||||
|
for (new a = 0; a < g_validMaps; ++a)
|
||||||
|
{
|
||||||
|
format(temp, charsmax(temp), "%d. %s^n", a+1, g_optionName[a])
|
||||||
|
len += copy(menu_msg[len], charsmax(menu_msg) - len, temp)
|
||||||
|
keys |= (1<<a)
|
||||||
|
}
|
||||||
|
|
||||||
|
format(menu_msg[len], charsmax(menu_msg) - len, "^n0. %L", LANG_SERVER, "NONE")
|
||||||
|
g_yesNoVote = 0
|
||||||
|
} else {
|
||||||
|
new lChangeMap[32], lYes[16], lNo[16]
|
||||||
|
|
||||||
|
format(lChangeMap, charsmax(lChangeMap), "%L", LANG_SERVER, "CHANGE_MAP_TO")
|
||||||
|
format(lYes, charsmax(lYes), "%L", LANG_SERVER, "YES")
|
||||||
|
format(lNo, charsmax(lNo), "%L", LANG_SERVER, "NO")
|
||||||
|
format(menu_msg, charsmax(menu_msg), g_coloredMenus ? "\y%s %s?\w^n^n1. %s^n2. %s" : "%s %s?^n^n1. %s^n2. %s", lChangeMap, g_optionName[0], lYes, lNo)
|
||||||
|
keys = MENU_KEY_1|MENU_KEY_2
|
||||||
|
g_yesNoVote = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
new authid[32], name[MAX_NAME_LENGTH]
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
|
||||||
|
if (argc == 2)
|
||||||
|
log_amx("Vote: ^"%s<%d><%s><>^" vote map (map ^"%s^")", name, get_user_userid(id), authid, g_optionName[0])
|
||||||
|
else
|
||||||
|
log_amx("Vote: ^"%s<%d><%s><>^" vote maps (map#1 ^"%s^") (map#2 ^"%s^") (map#3 ^"%s^") (map#4 ^"%s^")", name, get_user_userid(id), authid, g_optionName[0], g_optionName[1], g_optionName[2], g_optionName[3])
|
||||||
|
|
||||||
|
new msg[256];
|
||||||
|
for (new i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i) && !is_user_bot(i))
|
||||||
|
{
|
||||||
|
// HACK: ADMIN_VOTE_MAP_{1,2} keys were designed very poorly. Remove all : and %s in it.
|
||||||
|
LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_MAP_1", i);
|
||||||
|
replace_all(msg, charsmax(msg), "%s", "");
|
||||||
|
replace_all(msg, charsmax(msg), ":", "");
|
||||||
|
trim(msg);
|
||||||
|
show_activity_id(i, id, name, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_execResult = true
|
||||||
|
new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0
|
||||||
|
|
||||||
|
set_cvar_float("amx_last_voting", get_gametime() + vote_time)
|
||||||
|
g_voteRatio = get_cvar_float("amx_votemap_ratio")
|
||||||
|
g_Answer = "changelevel %s"
|
||||||
|
show_menu(0, keys, menu_msg, floatround(vote_time), (g_validMaps > 1) ? "Choose map: " : "Change map to ")
|
||||||
|
set_task(vote_time, "checkVotes", 99889988)
|
||||||
|
g_voteCaller = id
|
||||||
|
console_print(id, "%L", id, "VOTING_STARTED")
|
||||||
|
g_voteCount = {0, 0, 0, 0}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdVote(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 4))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new Float:voting = get_cvar_float("amx_last_voting")
|
||||||
|
if (voting > get_gametime())
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "ALREADY_VOTING")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime())
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "VOTING_NOT_ALLOW")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
new quest[48]
|
||||||
|
read_argv(1, quest, charsmax(quest))
|
||||||
|
|
||||||
|
trim(quest);
|
||||||
|
|
||||||
|
if (containi(quest, "sv_password") != -1 || containi(quest, "rcon_password") != -1)
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "VOTING_FORBIDDEN")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
new count=read_argc();
|
||||||
|
|
||||||
|
for (new i=0;i<4 && (i+2)<count;i++)
|
||||||
|
{
|
||||||
|
read_argv(i+2, g_optionName[i], charsmax(g_optionName[]));
|
||||||
|
}
|
||||||
|
|
||||||
|
new authid[32], name[MAX_NAME_LENGTH]
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
log_amx("Vote: ^"%s<%d><%s><>^" vote custom (question ^"%s^") (option#1 ^"%s^") (option#2 ^"%s^")", name, get_user_userid(id), authid, quest, g_optionName[0], g_optionName[1])
|
||||||
|
|
||||||
|
new msg[256];
|
||||||
|
for (new i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i) && !is_user_bot(i))
|
||||||
|
{
|
||||||
|
// HACK: ADMIN_VOTE_CUS_{1,2} keys were designed very poorly. Remove all : and %s in it.
|
||||||
|
LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_CUS_1", i);
|
||||||
|
replace_all(msg, charsmax(msg), "%s", "");
|
||||||
|
replace_all(msg, charsmax(msg), ":", "");
|
||||||
|
trim(msg);
|
||||||
|
show_activity_id(i, id, name, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new menu_msg[512], lVote[16]
|
||||||
|
|
||||||
|
format(lVote, charsmax(lVote), "%L", LANG_SERVER, "VOTE")
|
||||||
|
|
||||||
|
count-=2;
|
||||||
|
if (count>4)
|
||||||
|
{
|
||||||
|
count=4;
|
||||||
|
}
|
||||||
|
// count now shows how many options were listed
|
||||||
|
new keys=0;
|
||||||
|
for (new i=0;i<count;i++)
|
||||||
|
{
|
||||||
|
keys |= (1<<i);
|
||||||
|
}
|
||||||
|
|
||||||
|
new len=formatex(menu_msg, charsmax(menu_msg), g_coloredMenus ? "\y%s: %s\w^n^n" : "%s: %s^n^n", lVote, quest);
|
||||||
|
|
||||||
|
for (new i=0;i<count;i++)
|
||||||
|
{
|
||||||
|
len+=formatex(menu_msg[len], charsmax(menu_msg) - len ,"%d. %s^n",i+1,g_optionName[i]);
|
||||||
|
}
|
||||||
|
g_execResult = false
|
||||||
|
|
||||||
|
new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0
|
||||||
|
|
||||||
|
set_cvar_float("amx_last_voting", get_gametime() + vote_time)
|
||||||
|
g_voteRatio = get_cvar_float("amx_vote_ratio")
|
||||||
|
replace_all(quest, charsmax(quest), "%", "");
|
||||||
|
format(g_Answer, charsmax(g_Answer), "%s - ^"%%s^"", quest)
|
||||||
|
show_menu(0, keys, menu_msg, floatround(vote_time), "Vote: ")
|
||||||
|
set_task(vote_time, "checkVotes", 99889988)
|
||||||
|
g_voteCaller = id
|
||||||
|
console_print(id, "%L", id, "VOTING_STARTED")
|
||||||
|
g_voteCount = {0, 0, 0, 0}
|
||||||
|
g_yesNoVote = 0
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdVoteKickBan(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 2))
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
new Float:voting = get_cvar_float("amx_last_voting")
|
||||||
|
if (voting > get_gametime())
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "ALREADY_VOTING")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime())
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "VOTING_NOT_ALLOW")
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
new cmd[32]
|
||||||
|
|
||||||
|
read_argv(0, cmd, charsmax(cmd))
|
||||||
|
|
||||||
|
new voteban = equal(cmd, "amx_voteban")
|
||||||
|
new arg[32]
|
||||||
|
read_argv(1, arg, charsmax(arg))
|
||||||
|
|
||||||
|
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
|
||||||
|
|
||||||
|
if (!player)
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
|
if (voteban && is_user_bot(player))
|
||||||
|
{
|
||||||
|
new imname[MAX_NAME_LENGTH]
|
||||||
|
|
||||||
|
get_user_name(player, imname, charsmax(imname))
|
||||||
|
console_print(id, "%L", id, "ACTION_PERFORMED", imname)
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
new keys = MENU_KEY_1|MENU_KEY_2
|
||||||
|
new menu_msg[256], lYes[16], lNo[16], lKickBan[16]
|
||||||
|
|
||||||
|
format(lYes, charsmax(lYes), "%L", LANG_SERVER, "YES")
|
||||||
|
format(lNo, charsmax(lNo), "%L", LANG_SERVER, "NO")
|
||||||
|
format(lKickBan, charsmax(lKickBan), "%L", LANG_SERVER, voteban ? "BAN" : "KICK")
|
||||||
|
ucfirst(lKickBan)
|
||||||
|
get_user_name(player, arg, charsmax(arg))
|
||||||
|
format(menu_msg, charsmax(menu_msg), g_coloredMenus ? "\y%s %s?\w^n^n1. %s^n2. %s" : "%s %s?^n^n1. %s^n2. %s", lKickBan, arg, lYes, lNo)
|
||||||
|
g_yesNoVote = 1
|
||||||
|
|
||||||
|
new bool:ipban=false;
|
||||||
|
|
||||||
|
if (voteban)
|
||||||
|
{
|
||||||
|
get_user_authid(player, g_optionName[0], charsmax(g_optionName[]));
|
||||||
|
|
||||||
|
// Do the same check that's in plmenu to determine if this should be an IP ban instead
|
||||||
|
if (equal("4294967295", g_optionName[0])
|
||||||
|
|| equal("HLTV", g_optionName[0])
|
||||||
|
|| equal("STEAM_ID_LAN", g_optionName[0])
|
||||||
|
|| equali("VALVE_ID_LAN", g_optionName[0]))
|
||||||
|
{
|
||||||
|
get_user_ip(player, g_optionName[0], charsmax(g_optionName[]), 1);
|
||||||
|
|
||||||
|
ipban=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
num_to_str(get_user_userid(player), g_optionName[0], charsmax(g_optionName[]))
|
||||||
|
}
|
||||||
|
|
||||||
|
new authid[32], name[MAX_NAME_LENGTH]
|
||||||
|
|
||||||
|
get_user_authid(id, authid, charsmax(authid))
|
||||||
|
get_user_name(id, name, charsmax(name))
|
||||||
|
log_amx("Vote: ^"%s<%d><%s><>^" vote %s (target ^"%s^")", name, get_user_userid(id), authid, voteban ? "ban" : "kick", arg)
|
||||||
|
|
||||||
|
new msg[256];
|
||||||
|
new right[256];
|
||||||
|
new dummy[1];
|
||||||
|
for (new i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i) && !is_user_bot(i))
|
||||||
|
{
|
||||||
|
formatex(lKickBan, charsmax(lKickBan), "%L", i, voteban ? "BAN" : "KICK");
|
||||||
|
|
||||||
|
// HACK: ADMIN_VOTE_FOR{1,2} keys are really weird. Tokenize and ignore the text before the :
|
||||||
|
LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_FOR_1", i);
|
||||||
|
strtok(msg, dummy, 0, right, charsmax(right), ':');
|
||||||
|
trim(right);
|
||||||
|
show_activity_id(i, id, name, right, lKickBan, arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_execResult = true
|
||||||
|
|
||||||
|
new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0
|
||||||
|
|
||||||
|
set_cvar_float("amx_last_voting", get_gametime() + vote_time)
|
||||||
|
g_voteRatio = get_cvar_float(voteban ? "amx_voteban_ratio" : "amx_votekick_ratio")
|
||||||
|
|
||||||
|
if (voteban)
|
||||||
|
{
|
||||||
|
if (ipban==true)
|
||||||
|
{
|
||||||
|
g_Answer = "addip 30.0 %s";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_Answer = "banid 30.0 %s kick";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_Answer = "kick #%s";
|
||||||
|
}
|
||||||
|
show_menu(0, keys, menu_msg, floatround(vote_time), voteban ? "Ban " : "Kick ")
|
||||||
|
set_task(vote_time, "checkVotes", 99889988)
|
||||||
|
g_voteCaller = id
|
||||||
|
console_print(id, "%L", id, "VOTING_STARTED")
|
||||||
|
g_voteCount = {0, 0, 0, 0}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
BIN
amxmodx/scripting/amxxpc
Executable file
BIN
amxmodx/scripting/amxxpc
Executable file
Binary file not shown.
BIN
amxmodx/scripting/amxxpc32.so
Executable file
BIN
amxmodx/scripting/amxxpc32.so
Executable file
Binary file not shown.
57
amxmodx/scripting/antiflood.sma
Executable file
57
amxmodx/scripting/antiflood.sma
Executable file
|
@ -0,0 +1,57 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Anti Flood Plugin
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
|
||||||
|
new Float:g_Flooding[MAX_PLAYERS + 1] = {0.0, ...}
|
||||||
|
new g_Flood[MAX_PLAYERS + 1] = {0, ...}
|
||||||
|
|
||||||
|
new amx_flood_time;
|
||||||
|
|
||||||
|
public plugin_init()
|
||||||
|
{
|
||||||
|
register_plugin("Anti Flood", AMXX_VERSION_STR, "AMXX Dev Team")
|
||||||
|
register_dictionary("antiflood.txt")
|
||||||
|
register_clcmd("say", "chkFlood")
|
||||||
|
register_clcmd("say_team", "chkFlood")
|
||||||
|
amx_flood_time=register_cvar("amx_flood_time", "0.75")
|
||||||
|
}
|
||||||
|
|
||||||
|
public chkFlood(id)
|
||||||
|
{
|
||||||
|
new Float:maxChat = get_pcvar_float(amx_flood_time)
|
||||||
|
|
||||||
|
if (maxChat)
|
||||||
|
{
|
||||||
|
new Float:nexTime = get_gametime()
|
||||||
|
|
||||||
|
if (g_Flooding[id] > nexTime)
|
||||||
|
{
|
||||||
|
if (g_Flood[id] >= 3)
|
||||||
|
{
|
||||||
|
client_print(id, print_notify, "** %L **", id, "STOP_FLOOD")
|
||||||
|
g_Flooding[id] = nexTime + maxChat + 3.0
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
g_Flood[id]++
|
||||||
|
}
|
||||||
|
else if (g_Flood[id])
|
||||||
|
{
|
||||||
|
g_Flood[id]--
|
||||||
|
}
|
||||||
|
|
||||||
|
g_Flooding[id] = nexTime + maxChat
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
560
amxmodx/scripting/cmdmenu.sma
Executable file
560
amxmodx/scripting/cmdmenu.sma
Executable file
|
@ -0,0 +1,560 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Commands Menu Plugin
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
#include <amxmisc>
|
||||||
|
|
||||||
|
// Precache sounds from speech.ini - comment this line to disable
|
||||||
|
#define PRECACHE_SPEECHINI
|
||||||
|
|
||||||
|
/* Commands Menus */
|
||||||
|
|
||||||
|
#define MAX_CMDS_LAYERS 3
|
||||||
|
|
||||||
|
new g_cmdMenuName[MAX_CMDS_LAYERS][] =
|
||||||
|
{
|
||||||
|
"CMD_MENU",
|
||||||
|
"CONF_MENU",
|
||||||
|
"SPE_MENU"
|
||||||
|
};
|
||||||
|
|
||||||
|
new g_cmdMenuCmd[MAX_CMDS_LAYERS][] =
|
||||||
|
{
|
||||||
|
"amx_cmdmenu",
|
||||||
|
"amx_cfgmenu",
|
||||||
|
"amx_speechmenu"
|
||||||
|
};
|
||||||
|
|
||||||
|
new g_cmdMenuCfg[MAX_CMDS_LAYERS][] =
|
||||||
|
{
|
||||||
|
"cmds.ini",
|
||||||
|
"configs.ini",
|
||||||
|
"speech.ini"
|
||||||
|
};
|
||||||
|
|
||||||
|
new g_cmdMenuHelp[MAX_CMDS_LAYERS][] =
|
||||||
|
{
|
||||||
|
"- displays commands menu",
|
||||||
|
"- displays configs menu",
|
||||||
|
"- displays speech menu"
|
||||||
|
};
|
||||||
|
|
||||||
|
/* End of Commands Menu */
|
||||||
|
|
||||||
|
#define MAX_CMDS 64
|
||||||
|
#define MAX_CVARS 48
|
||||||
|
|
||||||
|
new g_cmdName[MAX_CMDS*MAX_CMDS_LAYERS][32];
|
||||||
|
new g_cmdCmd[MAX_CMDS*MAX_CMDS_LAYERS][64];
|
||||||
|
new g_cmdMisc[MAX_CMDS*MAX_CMDS_LAYERS][2];
|
||||||
|
new g_cmdNum[MAX_CMDS_LAYERS];
|
||||||
|
|
||||||
|
new g_cvarNames[MAX_CVARS][32];
|
||||||
|
new g_cvarMisc[MAX_CVARS][3];
|
||||||
|
new g_cvarCmd[MAX_CVARS*5][32];
|
||||||
|
new g_cvarCmdNum;
|
||||||
|
new g_cvarNum;
|
||||||
|
|
||||||
|
new g_menuPosition[MAX_PLAYERS + 1];
|
||||||
|
new g_menuSelect[MAX_PLAYERS + 1][MAX_CMDS];
|
||||||
|
new g_menuSelectNum[MAX_PLAYERS + 1];
|
||||||
|
new g_menuLayer[MAX_PLAYERS + 1];
|
||||||
|
|
||||||
|
new g_coloredMenus;
|
||||||
|
|
||||||
|
|
||||||
|
public plugin_init()
|
||||||
|
{
|
||||||
|
register_plugin("Commands Menu", AMXX_VERSION_STR, "AMXX Dev Team");
|
||||||
|
register_dictionary("cmdmenu.txt");
|
||||||
|
register_dictionary("common.txt");
|
||||||
|
|
||||||
|
new configsDir[64], config[64];
|
||||||
|
get_configsdir(configsDir, charsmax(configsDir));
|
||||||
|
|
||||||
|
for (new a = 0; a < MAX_CMDS_LAYERS; ++a)
|
||||||
|
{
|
||||||
|
new MenuName[64];
|
||||||
|
|
||||||
|
formatex(MenuName, charsmax(MenuName), "%L", "en", g_cmdMenuName[a]);
|
||||||
|
register_menucmd(register_menuid(MenuName), 1023, "actionCmdMenu");
|
||||||
|
register_clcmd(g_cmdMenuCmd[a], "cmdCmdMenu", ADMIN_MENU, g_cmdMenuHelp[a]);
|
||||||
|
formatex(config, charsmax(config), "%s/%s", configsDir, g_cmdMenuCfg[a]);
|
||||||
|
loadCmdSettings(config, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
register_menucmd(register_menuid("Cvars Menu"), 1023, "actionCvarMenu");
|
||||||
|
register_clcmd("amx_cvarmenu", "cmdCvarMenu", ADMIN_CVAR, "- displays cvars menu");
|
||||||
|
|
||||||
|
new cvars_ini_file[64];
|
||||||
|
formatex(cvars_ini_file, charsmax(cvars_ini_file), "%s/%s", configsDir, "cvars.ini");
|
||||||
|
loadCvarSettings(cvars_ini_file);
|
||||||
|
|
||||||
|
g_coloredMenus = colored_menus();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined PRECACHE_SPEECHINI
|
||||||
|
public plugin_precache( )
|
||||||
|
{
|
||||||
|
new configsDir[64], config[64];
|
||||||
|
get_configsdir(configsDir, charsmax(configsDir));
|
||||||
|
formatex( config, charsmax(config), "%s/%s", configsDir, "speech.ini" );
|
||||||
|
|
||||||
|
new fp = fopen( config, "rt" ); // Read file as text
|
||||||
|
|
||||||
|
if ( ! fp ) // File doesn't exists
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
new szText[256];
|
||||||
|
new line = 0;
|
||||||
|
new szName[32], szSound[128], sndExt[5];
|
||||||
|
new field1[32], field2[64], field3[64];
|
||||||
|
new fieldNums = 0;
|
||||||
|
new const voxIdent[] = "vox", fvoxIdent[] = "fvox", barneyIdent[] = "barney", hgruntIdent[] = "hgrunt";
|
||||||
|
|
||||||
|
while ( line < MAX_CMDS && ! feof( fp ) ) // Loop till MAX_CMDS or EOF
|
||||||
|
{
|
||||||
|
fgets( fp, szText, charsmax(szText) ); // Store line content
|
||||||
|
|
||||||
|
/* Strips newline */
|
||||||
|
new len = strlen( szText );
|
||||||
|
if ( len != 0 && szText[len-1] == '^n' ) // len != 0 because if the last line of the file is empty, there's no newline
|
||||||
|
{
|
||||||
|
szText[--len] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( len == 0 || szText[0] == ';' || szText[0] == '/' ) // Line is empty or a comment
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
parse( szText, szName, charsmax(szName), szSound, charsmax(szSound) );
|
||||||
|
fieldNums = parse( szSound, field1, charsmax(field1), field2, charsmax(field2), field3, charsmax(field3) );
|
||||||
|
if ( fieldNums == 2 && field1[0] == 's' ) // .wav (spk)
|
||||||
|
{
|
||||||
|
copy( szSound, charsmax(szSound), field2 );
|
||||||
|
copy( sndExt, charsmax(sndExt), ".wav" );
|
||||||
|
}
|
||||||
|
else if ( fieldNums == 3 && field1[0] == 'm' && ( field2[0] == 'p' || field2[0] == 'l' ) ) // .mp3 (mp3 play | mp3 loop)
|
||||||
|
{
|
||||||
|
copy( szSound, charsmax(szSound), field3 );
|
||||||
|
copy( sndExt, charsmax(sndExt), ".mp3" );
|
||||||
|
}
|
||||||
|
else // WTH is this sound, drop it.
|
||||||
|
continue;
|
||||||
|
|
||||||
|
replace_all( szSound, charsmax(szSound), "\'", "" ); // Strips all ugly (and sometimes useless) \'
|
||||||
|
|
||||||
|
if ( szSound[0] == '/' )
|
||||||
|
{
|
||||||
|
replace( szSound, charsmax(szSound), "/", "" ); // Strip leading slash
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( sndExt[1] == 'm' || ( ! equali( szSound, voxIdent, charsmax(voxIdent) ) && ! equali( szSound, fvoxIdent, charsmax(fvoxIdent) ) && ! equali( szSound, barneyIdent, charsmax(barneyIdent) ) && ! equali( szSound, hgruntIdent, charsmax(hgruntIdent) ) ) )
|
||||||
|
{
|
||||||
|
// SzSound is a mp3, or a custom wav (not a vox, fvox, or default sound from HL pak)
|
||||||
|
if ( !equali( szSound[strlen(szSound)-4], sndExt ) )
|
||||||
|
{
|
||||||
|
add( szSound, charsmax(szSound), sndExt ); // Add filetype extension if it isn't already specified
|
||||||
|
}
|
||||||
|
if ( sndExt[1] == 'w' )
|
||||||
|
{
|
||||||
|
format( szSound, charsmax(szSound), "sound/%s", szSound ); // spk basedir is $moddir/sound, but mp3 play is $moddir, fix this for the file_exists check
|
||||||
|
}
|
||||||
|
if ( file_exists( szSound ) )
|
||||||
|
{
|
||||||
|
if ( sndExt[1] == 'm')
|
||||||
|
{
|
||||||
|
precache_generic( szSound ); // mp3
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
replace( szSound, charsmax(szSound), "sound/", "" ); // wav, strip the leading sound/ we added for our file_exists check
|
||||||
|
precache_sound( szSound );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
line++;
|
||||||
|
}
|
||||||
|
fclose( fp ); // Close file
|
||||||
|
return line;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Commands menu */
|
||||||
|
|
||||||
|
public actionCmdMenu(id, key)
|
||||||
|
{
|
||||||
|
switch (key)
|
||||||
|
{
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
|
displayCmdMenu(id, ++g_menuPosition[id]);
|
||||||
|
}
|
||||||
|
case 9:
|
||||||
|
{
|
||||||
|
displayCmdMenu(id, --g_menuPosition[id]);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
new option = g_menuSelect[id][g_menuPosition[id] * 8 + key];
|
||||||
|
new flags = g_cmdMisc[option][1];
|
||||||
|
|
||||||
|
if (flags & 1)
|
||||||
|
server_cmd("%s", g_cmdCmd[option])
|
||||||
|
else if (flags & 2)
|
||||||
|
client_cmd(id, "%s", g_cmdCmd[option])
|
||||||
|
else if (flags & 4)
|
||||||
|
client_cmd(0, "%s", g_cmdCmd[option])
|
||||||
|
|
||||||
|
if (flags & 8)
|
||||||
|
{
|
||||||
|
displayCmdMenu(id, g_menuPosition[id]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
displayCmdMenu(id, pos)
|
||||||
|
{
|
||||||
|
if (pos < 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
new menuBody[512];
|
||||||
|
new b = 0;
|
||||||
|
new start = pos * 8;
|
||||||
|
|
||||||
|
if (start >= g_menuSelectNum[id])
|
||||||
|
{
|
||||||
|
start = pos = g_menuPosition[id] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
new limit = (g_menuSelectNum[id] / 8 + ((g_menuSelectNum[id] % 8)));
|
||||||
|
new len = formatex(menuBody, charsmax(menuBody), g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, g_cmdMenuName[g_menuLayer[id]], pos + 1, (limit == 0) ? 1 : limit);
|
||||||
|
new end = start + 8;
|
||||||
|
new keys = MENU_KEY_0;
|
||||||
|
|
||||||
|
if (end > g_menuSelectNum[id])
|
||||||
|
{
|
||||||
|
end = g_menuSelectNum[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (new a = start; a < end; ++a)
|
||||||
|
{
|
||||||
|
if (g_cmdCmd[g_menuSelect[id][a]][0] == '-')
|
||||||
|
{
|
||||||
|
if (g_coloredMenus)
|
||||||
|
{
|
||||||
|
len += formatex(menuBody[len], charsmax(menuBody) - len, "\d%s^n\w", g_cmdName[g_menuSelect[id][a]]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
len += formatex(menuBody[len], charsmax(menuBody) - len, "%s^n", g_cmdName[g_menuSelect[id][a]]);
|
||||||
|
}
|
||||||
|
++b;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
keys |= (1<<b);
|
||||||
|
len += formatex(menuBody[len], charsmax(menuBody) - len, "%d. %s^n", ++b, g_cmdName[g_menuSelect[id][a]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (end != g_menuSelectNum[id])
|
||||||
|
{
|
||||||
|
formatex(menuBody[len], charsmax(menuBody) - len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT");
|
||||||
|
keys |= MENU_KEY_9;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
formatex(menuBody[len], charsmax(menuBody) - len, "^n0. %L", id, pos ? "BACK" : "EXIT");
|
||||||
|
}
|
||||||
|
|
||||||
|
new MenuName[64];
|
||||||
|
|
||||||
|
formatex(MenuName, charsmax(MenuName), "%L", "en", g_cmdMenuName[g_menuLayer[id]]);
|
||||||
|
show_menu(id, keys, menuBody, -1, MenuName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdCmdMenu(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 1))
|
||||||
|
{
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
new szCmd[32];
|
||||||
|
read_argv(0, szCmd, charsmax(szCmd));
|
||||||
|
new lvl = 0;
|
||||||
|
|
||||||
|
while (lvl < MAX_CMDS_LAYERS)
|
||||||
|
{
|
||||||
|
if (equal(g_cmdMenuCmd[lvl], szCmd))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
++lvl;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_menuLayer[id] = lvl;
|
||||||
|
g_menuSelectNum[id] = 0;
|
||||||
|
|
||||||
|
new a = lvl * MAX_CMDS;
|
||||||
|
new d, c = 0;
|
||||||
|
|
||||||
|
while (c < g_cmdNum[lvl])
|
||||||
|
{
|
||||||
|
d = a + c;
|
||||||
|
|
||||||
|
if (access(id, g_cmdMisc[d][0]))
|
||||||
|
{
|
||||||
|
g_menuSelect[id][g_menuSelectNum[id]++] = d;
|
||||||
|
}
|
||||||
|
|
||||||
|
++c;
|
||||||
|
}
|
||||||
|
|
||||||
|
displayCmdMenu(id, g_menuPosition[id] = 0);
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
loadCmdSettings(szFilename[], level)
|
||||||
|
{
|
||||||
|
if (!file_exists(szFilename))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
new text[256], szFlags[32], szAccess[32];
|
||||||
|
new a, pos = 0, c, d = level * MAX_CMDS;
|
||||||
|
|
||||||
|
while (g_cmdNum[level] < MAX_CMDS && read_file(szFilename, pos++, text, charsmax(text), a))
|
||||||
|
{
|
||||||
|
if (text[0] == ';')
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
c = d + g_cmdNum[level];
|
||||||
|
|
||||||
|
if (parse(text, g_cmdName[c], charsmax(g_cmdName[]), g_cmdCmd[c], charsmax(g_cmdCmd[]), szFlags, charsmax(szFlags), szAccess, charsmax(szAccess)) > 3)
|
||||||
|
{
|
||||||
|
while (replace(g_cmdCmd[c], charsmax(g_cmdCmd[]), "\'", "^""))
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
g_cmdMisc[c][1] = read_flags(szFlags);
|
||||||
|
g_cmdMisc[c][0] = read_flags(szAccess);
|
||||||
|
g_cmdNum[level]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cvars menu */
|
||||||
|
|
||||||
|
public actionCvarMenu(id, key)
|
||||||
|
{
|
||||||
|
switch (key)
|
||||||
|
{
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
|
displayCvarMenu(id, ++g_menuPosition[id]);
|
||||||
|
}
|
||||||
|
case 9:
|
||||||
|
{
|
||||||
|
displayCvarMenu(id, --g_menuPosition[id]);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
new option = g_menuSelect[id][g_menuPosition[id] * 8 + key];
|
||||||
|
new szValue[32];
|
||||||
|
|
||||||
|
get_cvar_string(g_cvarNames[option], szValue, charsmax(szValue));
|
||||||
|
|
||||||
|
new end = g_cvarMisc[option][2];
|
||||||
|
new start = g_cvarMisc[option][1];
|
||||||
|
|
||||||
|
for (new i = start; ; ++i)
|
||||||
|
{
|
||||||
|
if (i < end)
|
||||||
|
{
|
||||||
|
if (equal(szValue, g_cvarCmd[i]))
|
||||||
|
{
|
||||||
|
if (++i >= end)
|
||||||
|
{
|
||||||
|
i = start;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_cvar_string(g_cvarNames[option], g_cvarCmd[i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
set_cvar_string(g_cvarNames[option], g_cvarCmd[start]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
displayCvarMenu(id, g_menuPosition[id]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
displayCvarMenu(id, pos)
|
||||||
|
{
|
||||||
|
if (pos < 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
new menuBody[512];
|
||||||
|
new b = 0;
|
||||||
|
new start = pos * 8;
|
||||||
|
|
||||||
|
if (start >= g_menuSelectNum[id])
|
||||||
|
{
|
||||||
|
start = pos = g_menuPosition[id] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
new len = formatex(menuBody, charsmax(menuBody), g_coloredMenus ? "\yCvars Menu\R%d/%d^n\w^n" : "Cvars Menu %d/%d^n^n", pos + 1, (g_menuSelectNum[id] / 8 + ((g_menuSelectNum[id] % 8) ? 1 : 0)));
|
||||||
|
|
||||||
|
new end = start + 8;
|
||||||
|
new keys = MENU_KEY_0;
|
||||||
|
new szValue[64];
|
||||||
|
|
||||||
|
if (end > g_menuSelectNum[id])
|
||||||
|
{
|
||||||
|
end = g_menuSelectNum[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (new a = start; a < end; ++a)
|
||||||
|
{
|
||||||
|
get_cvar_string(g_cvarNames[g_menuSelect[id][a]], szValue, charsmax(szValue));
|
||||||
|
keys |= (1<<b);
|
||||||
|
++b;
|
||||||
|
|
||||||
|
if (g_coloredMenus)
|
||||||
|
{
|
||||||
|
len += formatex(menuBody[len], charsmax(menuBody) - len, "%d. %s\R%s^n\w", b, g_cvarNames[g_menuSelect[id][a]], szValue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
len += formatex(menuBody[len], charsmax(menuBody) - len, "%d. %s %s^n", b, g_cvarNames[g_menuSelect[id][a]], szValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (end != g_menuSelectNum[id])
|
||||||
|
{
|
||||||
|
formatex(menuBody[len], charsmax(menuBody) - len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT");
|
||||||
|
keys |= MENU_KEY_9;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
formatex(menuBody[len], charsmax(menuBody) - len, "^n0. %L", id, pos ? "BACK" : "EXIT");
|
||||||
|
}
|
||||||
|
|
||||||
|
show_menu(id, keys, menuBody);
|
||||||
|
}
|
||||||
|
|
||||||
|
public cmdCvarMenu(id, level, cid)
|
||||||
|
{
|
||||||
|
if (!cmd_access(id, level, cid, 1))
|
||||||
|
{
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_menuSelectNum[id] = 0;
|
||||||
|
|
||||||
|
for (new a = 0; a < g_cvarNum; ++a)
|
||||||
|
{
|
||||||
|
if (access(id, g_cvarMisc[a][0]))
|
||||||
|
{
|
||||||
|
g_menuSelect[id][g_menuSelectNum[id]++] = a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
displayCvarMenu(id, g_menuPosition[id] = 0);
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
loadCvarSettings(szFilename[])
|
||||||
|
{
|
||||||
|
if (!file_exists(szFilename))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
new text[256], szValues[12][32];
|
||||||
|
new inum, a, pos = 0;
|
||||||
|
new cvar_values = MAX_CVARS * 5;
|
||||||
|
|
||||||
|
// a b c d
|
||||||
|
while (g_cvarNum < MAX_CVARS && read_file(szFilename, pos++, text, charsmax(text), a))
|
||||||
|
{
|
||||||
|
if (text[0] == ';')
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
inum = parse(text, g_cvarNames[g_cvarNum], charsmax(g_cvarNames[]),
|
||||||
|
szValues[0], charsmax(szValues[]),
|
||||||
|
szValues[1], charsmax(szValues[]),
|
||||||
|
szValues[2], charsmax(szValues[]),
|
||||||
|
szValues[3], charsmax(szValues[]),
|
||||||
|
szValues[4], charsmax(szValues[]),
|
||||||
|
szValues[5], charsmax(szValues[]),
|
||||||
|
szValues[6], charsmax(szValues[]),
|
||||||
|
szValues[7], charsmax(szValues[]),
|
||||||
|
szValues[8], charsmax(szValues[]),
|
||||||
|
szValues[9], charsmax(szValues[]),
|
||||||
|
szValues[10], charsmax(szValues[]),
|
||||||
|
szValues[11], charsmax(szValues[]));
|
||||||
|
|
||||||
|
inum -= 2;
|
||||||
|
if (inum < 2)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_cvarMisc[g_cvarNum][1] = g_cvarCmdNum;
|
||||||
|
|
||||||
|
for (a = 0; a < inum && g_cvarCmdNum < cvar_values; ++a)
|
||||||
|
{
|
||||||
|
while (replace(szValues[a], charsmax(szValues[]), "\'", "^""))
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
copy(g_cvarCmd[g_cvarCmdNum], charsmax(g_cvarCmd[]), szValues[a]);
|
||||||
|
g_cvarCmdNum++;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_cvarMisc[g_cvarNum][2] = g_cvarCmdNum;
|
||||||
|
g_cvarMisc[g_cvarNum][0] = read_flags(szValues[inum]);
|
||||||
|
g_cvarNum++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
24
amxmodx/scripting/compile.sh
Executable file
24
amxmodx/scripting/compile.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# AMX Mod X
|
||||||
|
#
|
||||||
|
# by the AMX Mod X Development Team
|
||||||
|
# originally developed by OLO
|
||||||
|
#
|
||||||
|
# This file is part of AMX Mod X.
|
||||||
|
|
||||||
|
# new code contributed by \malex\
|
||||||
|
|
||||||
|
test -e compiled || mkdir compiled
|
||||||
|
rm -f temp.txt
|
||||||
|
|
||||||
|
for sourcefile in *.sma
|
||||||
|
do
|
||||||
|
amxxfile="`echo $sourcefile | sed -e 's/\.sma$/.amxx/'`"
|
||||||
|
echo -n "Compiling $sourcefile ..."
|
||||||
|
./amxxpc $sourcefile -ocompiled/$amxxfile >> temp.txt
|
||||||
|
echo "done"
|
||||||
|
done
|
||||||
|
|
||||||
|
less temp.txt
|
||||||
|
rm temp.txt
|
37
amxmodx/scripting/csstats.sma
Executable file
37
amxmodx/scripting/csstats.sma
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Rank Calculation
|
||||||
|
//
|
||||||
|
|
||||||
|
/* File location: $moddir/addons/amxmodx/data/csstats.amxx */
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
|
||||||
|
/* Function calculates position in rank.
|
||||||
|
*
|
||||||
|
* Stats:
|
||||||
|
* 0 - kills
|
||||||
|
* 1 - deaths
|
||||||
|
* 2 - headshots
|
||||||
|
* 3 - teamkills
|
||||||
|
* 4 - shots
|
||||||
|
* 5 - hits
|
||||||
|
* 6 - damage
|
||||||
|
* 7 - defusions
|
||||||
|
* 8 - defused
|
||||||
|
* 9 - plants
|
||||||
|
* 10 - explosions
|
||||||
|
*
|
||||||
|
* Returning cellmin as value in get_score function
|
||||||
|
* makes that rank won't be saved. */
|
||||||
|
|
||||||
|
public get_score(stats[11], body[MAX_BODYHITS])
|
||||||
|
return stats[STATSX_KILLS] - stats[STATSX_DEATHS] - stats[STATSX_TEAMKILLS] // kills - deaths - teamkills
|
123
amxmodx/scripting/imessage.sma
Executable file
123
amxmodx/scripting/imessage.sma
Executable file
|
@ -0,0 +1,123 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
//
|
||||||
|
// Info. Messages Plugin
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <amxmodx>
|
||||||
|
#include <amxmisc>
|
||||||
|
|
||||||
|
#define X_POS -1.0
|
||||||
|
#define Y_POS 0.20
|
||||||
|
#define HOLD_TIME 12.0
|
||||||
|
|
||||||
|
new Array:g_Values
|
||||||
|
new Array:g_Messages
|
||||||
|
new g_MessagesNum
|
||||||
|
new g_Current
|
||||||
|
|
||||||
|
new amx_freq_imessage;
|
||||||
|
|
||||||
|
public plugin_init()
|
||||||
|
{
|
||||||
|
g_Messages=ArrayCreate(384);
|
||||||
|
g_Values=ArrayCreate(3);
|
||||||
|
register_plugin("Info. Messages", AMXX_VERSION_STR, "AMXX Dev Team")
|
||||||
|
register_dictionary("imessage.txt")
|
||||||
|
register_dictionary("common.txt")
|
||||||
|
register_srvcmd("amx_imessage", "setMessage")
|
||||||
|
amx_freq_imessage=register_cvar("amx_freq_imessage", "10")
|
||||||
|
|
||||||
|
new lastinfo[8]
|
||||||
|
get_localinfo("lastinfomsg", lastinfo, charsmax(lastinfo))
|
||||||
|
g_Current = str_to_num(lastinfo)
|
||||||
|
set_localinfo("lastinfomsg", "")
|
||||||
|
}
|
||||||
|
|
||||||
|
public infoMessage()
|
||||||
|
{
|
||||||
|
if (g_Current >= g_MessagesNum)
|
||||||
|
g_Current = 0
|
||||||
|
|
||||||
|
// No messages, just get out of here
|
||||||
|
if (g_MessagesNum==0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
new values[3];
|
||||||
|
new Message[384];
|
||||||
|
|
||||||
|
ArrayGetString(g_Messages, g_Current, Message, charsmax(Message));
|
||||||
|
ArrayGetArray(g_Values, g_Current, values);
|
||||||
|
|
||||||
|
new hostname[64];
|
||||||
|
|
||||||
|
get_cvar_string("hostname", hostname, charsmax(hostname));
|
||||||
|
replace(Message, charsmax(Message), "%hostname%", hostname);
|
||||||
|
|
||||||
|
set_hudmessage(values[0], values[1], values[2], X_POS, Y_POS, 0, 0.5, HOLD_TIME, 2.0, 2.0, -1);
|
||||||
|
|
||||||
|
show_hudmessage(0, "%s", Message);
|
||||||
|
|
||||||
|
client_print(0, print_console, "%s", Message);
|
||||||
|
++g_Current;
|
||||||
|
|
||||||
|
new Float:freq_im = get_pcvar_float(amx_freq_imessage);
|
||||||
|
|
||||||
|
if (freq_im > 0.0)
|
||||||
|
set_task(freq_im, "infoMessage", 12345);
|
||||||
|
}
|
||||||
|
|
||||||
|
public setMessage()
|
||||||
|
{
|
||||||
|
|
||||||
|
new Message[384];
|
||||||
|
|
||||||
|
remove_task(12345)
|
||||||
|
read_argv(1, Message, charsmax(Message))
|
||||||
|
|
||||||
|
while (replace(Message, charsmax(Message), "\n", "^n")) {}
|
||||||
|
|
||||||
|
new mycol[12]
|
||||||
|
new vals[3];
|
||||||
|
|
||||||
|
read_argv(2, mycol, charsmax(mycol)) // RRRGGGBBB
|
||||||
|
vals[2] = str_to_num(mycol[6])
|
||||||
|
|
||||||
|
mycol[6] = 0
|
||||||
|
vals[1] = str_to_num(mycol[3])
|
||||||
|
|
||||||
|
mycol[3] = 0
|
||||||
|
vals[0] = str_to_num(mycol[0])
|
||||||
|
|
||||||
|
g_MessagesNum++
|
||||||
|
|
||||||
|
new Float:freq_im = get_pcvar_float(amx_freq_imessage)
|
||||||
|
|
||||||
|
ArrayPushString(g_Messages, Message);
|
||||||
|
ArrayPushArray(g_Values, vals);
|
||||||
|
|
||||||
|
if (freq_im > 0.0)
|
||||||
|
set_task(freq_im, "infoMessage", 12345)
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public plugin_end()
|
||||||
|
{
|
||||||
|
new lastinfo[8]
|
||||||
|
|
||||||
|
num_to_str(g_Current, lastinfo, charsmax(lastinfo))
|
||||||
|
set_localinfo("lastinfomsg", lastinfo)
|
||||||
|
|
||||||
|
ArrayDestroy(g_Messages)
|
||||||
|
ArrayDestroy(g_Values)
|
||||||
|
}
|
593
amxmodx/scripting/include/amxconst.inc
Normal file
593
amxmodx/scripting/include/amxconst.inc
Normal file
|
@ -0,0 +1,593 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
#if defined _amxconst_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _amxconst_included
|
||||||
|
|
||||||
|
#include <amxmodx_version>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal AMXX buffer size for string retrieval.
|
||||||
|
*
|
||||||
|
* @note This is the buffer size AMX Mod X uses internally to retrieve strings
|
||||||
|
* from plugins. Most natives that take strings as arguments will
|
||||||
|
* implicitly truncate them to this maximum length. This has been raised
|
||||||
|
* to the current value with AMXX 1.8.3. Previously the limit was 3072.
|
||||||
|
* @note This is here mainly for documentation purposes. By default plugins
|
||||||
|
* don't have enough memory available to allocate an array of this size.
|
||||||
|
* You probably should not use this to actually declare a buffer unless
|
||||||
|
* you *absolutely* have to. Look at #pragma dynamic to increase a plugins
|
||||||
|
* available memory.
|
||||||
|
*/
|
||||||
|
#define MAX_STRING_LENGTH 16384
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum buffer size required to store a map's name.
|
||||||
|
*/
|
||||||
|
#define MAX_MAPNAME_LENGTH 64
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines and constants related to the maximum number of clients.
|
||||||
|
*
|
||||||
|
* @note MAX_PLAYERS is not the same as MaxClients. MAX_PLAYERS is a hardcoded
|
||||||
|
* value as an upper limit, used mainly to declare arrays big enough for
|
||||||
|
* all possible server situations. MaxClients changes based on the
|
||||||
|
* server the plugin is deployed on..
|
||||||
|
*/
|
||||||
|
#define MAX_PLAYERS 32 /* Maximum number of players AMX Mod X supports */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum number of players the server supports
|
||||||
|
*/
|
||||||
|
public stock const MaxClients;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Current map name
|
||||||
|
*/
|
||||||
|
public stock const MapName[MAX_MAPNAME_LENGTH];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pass this into certain functions to act as a C++ NULL
|
||||||
|
*/
|
||||||
|
public stock const NULL_STRING[1];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pass this into certain functions to act as a C++ NULL
|
||||||
|
*/
|
||||||
|
public stock const Float:NULL_VECTOR[3];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum buffer size required to store a client's name.
|
||||||
|
*/
|
||||||
|
#define MAX_NAME_LENGTH 32
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum buffer size required to store a client's IP address without a port.
|
||||||
|
*/
|
||||||
|
#define MAX_IP_LENGTH 16
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum buffer size required to store a client's IP address with a port.
|
||||||
|
*/
|
||||||
|
#define MAX_IP_WITH_PORT_LENGTH 22
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum buffer size required to store a client's AuthID.
|
||||||
|
*/
|
||||||
|
#define MAX_AUTHID_LENGTH 64
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum buffer size required to store a resource path.
|
||||||
|
*/
|
||||||
|
#define MAX_RESOURCE_PATH_LENGTH 64
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum buffer size that can be displayed in a MOTD.
|
||||||
|
*/
|
||||||
|
#define MAX_MOTD_LENGTH 1536
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum size accepted by the user info buffer.
|
||||||
|
*/
|
||||||
|
#define MAX_USER_INFO_LENGTH 256
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum buffer size that can be displayed in a menu.
|
||||||
|
*/
|
||||||
|
#define MAX_MENU_LENGTH 512
|
||||||
|
|
||||||
|
/**
|
||||||
|
* π
|
||||||
|
*/
|
||||||
|
#define M_PI 3.1415926535
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @section Admin privilege and authentication constants
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Admin level constants
|
||||||
|
*/
|
||||||
|
#define ADMIN_ALL 0 /* everyone */
|
||||||
|
#define ADMIN_IMMUNITY (1<<0) /* flag "a" */
|
||||||
|
#define ADMIN_RESERVATION (1<<1) /* flag "b" */
|
||||||
|
#define ADMIN_KICK (1<<2) /* flag "c" */
|
||||||
|
#define ADMIN_BAN (1<<3) /* flag "d" */
|
||||||
|
#define ADMIN_SLAY (1<<4) /* flag "e" */
|
||||||
|
#define ADMIN_MAP (1<<5) /* flag "f" */
|
||||||
|
#define ADMIN_CVAR (1<<6) /* flag "g" */
|
||||||
|
#define ADMIN_CFG (1<<7) /* flag "h" */
|
||||||
|
#define ADMIN_CHAT (1<<8) /* flag "i" */
|
||||||
|
#define ADMIN_VOTE (1<<9) /* flag "j" */
|
||||||
|
#define ADMIN_PASSWORD (1<<10) /* flag "k" */
|
||||||
|
#define ADMIN_RCON (1<<11) /* flag "l" */
|
||||||
|
#define ADMIN_LEVEL_A (1<<12) /* flag "m" */
|
||||||
|
#define ADMIN_LEVEL_B (1<<13) /* flag "n" */
|
||||||
|
#define ADMIN_LEVEL_C (1<<14) /* flag "o" */
|
||||||
|
#define ADMIN_LEVEL_D (1<<15) /* flag "p" */
|
||||||
|
#define ADMIN_LEVEL_E (1<<16) /* flag "q" */
|
||||||
|
#define ADMIN_LEVEL_F (1<<17) /* flag "r" */
|
||||||
|
#define ADMIN_LEVEL_G (1<<18) /* flag "s" */
|
||||||
|
#define ADMIN_LEVEL_H (1<<19) /* flag "t" */
|
||||||
|
#define ADMIN_MENU (1<<20) /* flag "u" */
|
||||||
|
#define ADMIN_BAN_TEMP (1<<21) /* flag "v" */
|
||||||
|
#define ADMIN_ADMIN (1<<24) /* flag "y" */
|
||||||
|
#define ADMIN_USER (1<<25) /* flag "z" */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Admin authentication behavior flags
|
||||||
|
*/
|
||||||
|
#define FLAG_KICK (1<<0) /* flag "a" */
|
||||||
|
#define FLAG_TAG (1<<1) /* flag "b" */
|
||||||
|
#define FLAG_AUTHID (1<<2) /* flag "c" */
|
||||||
|
#define FLAG_IP (1<<3) /* flag "d" */
|
||||||
|
#define FLAG_NOPASS (1<<4) /* flag "e" */
|
||||||
|
#define FLAG_CASE_SENSITIVE (1<<10) /* flag "k" */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endsection
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return codes
|
||||||
|
*/
|
||||||
|
#define PLUGIN_CONTINUE 0 /* Results returned by public functions */
|
||||||
|
#define PLUGIN_HANDLED 1 /* stop other plugins */
|
||||||
|
#define PLUGIN_HANDLED_MAIN 2 /* to use in client_command(), continue all plugins but stop the command */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HI weapon constants
|
||||||
|
*/
|
||||||
|
#define HIW_BERETTA 1
|
||||||
|
#define HIW_SPAS12 2
|
||||||
|
#define HIW_M4A1 3
|
||||||
|
#define HIW_MP5A4 4
|
||||||
|
#define HIW_MP5SD5 5
|
||||||
|
#define HIW_AK47 6
|
||||||
|
#define HIW_AKS74U 7
|
||||||
|
#define HIW_GLOCK 8
|
||||||
|
#define HIW_M11 9
|
||||||
|
#define HIW_M11SD 10
|
||||||
|
#define HIW_PSG1 11
|
||||||
|
#define HIW_ZASTAVA 12
|
||||||
|
#define HIW_M16A2 13
|
||||||
|
#define HIW_REMINGTON 14
|
||||||
|
#define HIW_NATOGREN 15
|
||||||
|
#define HIW_TANGOGREN 16
|
||||||
|
#define HIW_FLASHBANG 17
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parts of body for hits
|
||||||
|
*/
|
||||||
|
#define HIT_GENERIC 0 /* none */
|
||||||
|
#define HIT_HEAD 1
|
||||||
|
#define HIT_CHEST 2
|
||||||
|
#define HIT_STOMACH 3
|
||||||
|
#define HIT_LEFTARM 4
|
||||||
|
#define HIT_RIGHTARM 5
|
||||||
|
#define HIT_LEFTLEG 6
|
||||||
|
#define HIT_RIGHTLEG 7
|
||||||
|
#define HIT_SHIELD 8 // CS only
|
||||||
|
#define MAX_BODYHITS 8
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @section emit_sound() constants
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Channels
|
||||||
|
*/
|
||||||
|
#define CHAN_AUTO 0
|
||||||
|
#define CHAN_WEAPON 1
|
||||||
|
#define CHAN_VOICE 2
|
||||||
|
#define CHAN_ITEM 3
|
||||||
|
#define CHAN_BODY 4
|
||||||
|
#define CHAN_STREAM 5 /* allocate stream channel from the static or dynamic area */
|
||||||
|
#define CHAN_STATIC 6 /* allocate channel from the static area */
|
||||||
|
#define CHAN_NETWORKVOICE_BASE 7 /* voice data coming across the network */
|
||||||
|
#define CHAN_NETWORKVOICE_END 500 /* network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END). */
|
||||||
|
|
||||||
|
/**
|
||||||
|
*Attenuation values
|
||||||
|
*/
|
||||||
|
#define ATTN_NONE 0.00
|
||||||
|
#define ATTN_NORM 0.80
|
||||||
|
#define ATTN_IDLE 2.00
|
||||||
|
#define ATTN_STATIC 1.25
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pitch values
|
||||||
|
*/
|
||||||
|
#define PITCH_NORM 100 /* non-pitch shifted */
|
||||||
|
#define PITCH_LOW 95 /* other values are possible - 0-255, where 255 is very high */
|
||||||
|
#define PITCH_HIGH 120
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Volume values
|
||||||
|
*/
|
||||||
|
#define VOL_NORM 1.0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sound behavior constants
|
||||||
|
*/
|
||||||
|
#define SND_SPAWNING (1<<8) // we're spawing, used in some cases for ambients
|
||||||
|
#define SND_STOP (1<<5) // stop sound
|
||||||
|
#define SND_CHANGE_VOL (1<<6) // change sound vol
|
||||||
|
#define SND_CHANGE_PITCH (1<<7) // change sound pitch
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endsection
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Menu keys
|
||||||
|
*/
|
||||||
|
#define MENU_KEY_1 (1<<0)
|
||||||
|
#define MENU_KEY_2 (1<<1)
|
||||||
|
#define MENU_KEY_3 (1<<2)
|
||||||
|
#define MENU_KEY_4 (1<<3)
|
||||||
|
#define MENU_KEY_5 (1<<4)
|
||||||
|
#define MENU_KEY_6 (1<<5)
|
||||||
|
#define MENU_KEY_7 (1<<6)
|
||||||
|
#define MENU_KEY_8 (1<<7)
|
||||||
|
#define MENU_KEY_9 (1<<8)
|
||||||
|
#define MENU_KEY_0 (1<<9)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Language constants
|
||||||
|
*/
|
||||||
|
#define LANG_SERVER 0
|
||||||
|
#define LANG_PLAYER -1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @section Client print native constants
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destination types for client_print()
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
print_notify = 1,
|
||||||
|
print_console,
|
||||||
|
print_chat,
|
||||||
|
print_center,
|
||||||
|
print_radio /* Counter-Strike only */
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Color types for client_print_color()
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
print_team_default = 0,
|
||||||
|
print_team_grey = -1,
|
||||||
|
print_team_red = -2,
|
||||||
|
print_team_blue = -3,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destination types for engclient_print()
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
engprint_console = 0,
|
||||||
|
engprint_center,
|
||||||
|
engprint_chat,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endsection
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @section Entity rendering constants
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rendering modes (i.e. for set_user_rendering())
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
kRenderNormal = 0, /* src */
|
||||||
|
kRenderTransColor, /* c*a+dest*(1-a) */
|
||||||
|
kRenderTransTexture, /* src*a+dest*(1-a) */
|
||||||
|
kRenderGlow, /* src*a+dest -- No Z buffer checks */
|
||||||
|
kRenderTransAlpha, /* src*srca+dest*(1-srca) */
|
||||||
|
kRenderTransAdd, /* src*a+dest */
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rendering fx (i.e. for set_user_rendering())
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
kRenderFxNone = 0,
|
||||||
|
kRenderFxPulseSlow,
|
||||||
|
kRenderFxPulseFast,
|
||||||
|
kRenderFxPulseSlowWide,
|
||||||
|
kRenderFxPulseFastWide,
|
||||||
|
kRenderFxFadeSlow,
|
||||||
|
kRenderFxFadeFast,
|
||||||
|
kRenderFxSolidSlow,
|
||||||
|
kRenderFxSolidFast,
|
||||||
|
kRenderFxStrobeSlow,
|
||||||
|
kRenderFxStrobeFast,
|
||||||
|
kRenderFxStrobeFaster,
|
||||||
|
kRenderFxFlickerSlow,
|
||||||
|
kRenderFxFlickerFast,
|
||||||
|
kRenderFxNoDissipation,
|
||||||
|
kRenderFxDistort, /* Distort/scale/translate flicker */
|
||||||
|
kRenderFxHologram, /* kRenderFxDistort + distance fade */
|
||||||
|
kRenderFxDeadPlayer, /* kRenderAmt is the player index */
|
||||||
|
kRenderFxExplode, /* Scale up really big! */
|
||||||
|
kRenderFxGlowShell, /* Glowing Shell */
|
||||||
|
kRenderFxClampMinScale, /* Keep this sprite from getting very small (SPRITES only!) */
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endsection
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type for force_unmodified()
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
force_exactfile = 0, /* File on client must exactly match server's file */
|
||||||
|
force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */
|
||||||
|
force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status for get_module()
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
module_none = 0,
|
||||||
|
module_query,
|
||||||
|
module_badload,
|
||||||
|
module_loaded,
|
||||||
|
module_noinfo,
|
||||||
|
module_noquery,
|
||||||
|
module_noattach,
|
||||||
|
module_old,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AMX flag constants
|
||||||
|
*/
|
||||||
|
#define AMX_FLAG_DEBUG 0x02 /* symbolic info. available */
|
||||||
|
#define AMX_FLAG_COMPACT 0x04 /* compact encoding */
|
||||||
|
#define AMX_FLAG_BYTEOPC 0x08 /* opcode is a byte (not a cell) */
|
||||||
|
#define AMX_FLAG_NOCHECKS 0x10 /* no array bounds checking; no STMT opcode */
|
||||||
|
#define AMX_FLAG_NTVREG 0x1000 /* all native functions are registered */
|
||||||
|
#define AMX_FLAG_JITC 0x2000 /* abstract machine is JIT compiled */
|
||||||
|
#define AMX_FLAG_BROWSE 0x4000 /* busy browsing */
|
||||||
|
#define AMX_FLAG_RELOC 0x8000 /* jump/call addresses relocated */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invalid plugin id
|
||||||
|
*/
|
||||||
|
#define INVALID_PLUGIN_ID -1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Menu and menu item status codes
|
||||||
|
*/
|
||||||
|
#define MENU_TIMEOUT -4
|
||||||
|
#define MENU_EXIT -3
|
||||||
|
#define MENU_BACK -2
|
||||||
|
#define MENU_MORE -1
|
||||||
|
#define ITEM_IGNORE 0
|
||||||
|
#define ITEM_ENABLED 1
|
||||||
|
#define ITEM_DISABLED 2
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AMX error codes
|
||||||
|
*/
|
||||||
|
#define AMX_ERR_NATIVE 10
|
||||||
|
#define AMX_ERR_MEMACCESS 5
|
||||||
|
#define AMX_ERR_NONE 0
|
||||||
|
#define AMX_ERR_BOUNDS 4
|
||||||
|
#define AMX_ERR_STACKERR 3
|
||||||
|
#define AMX_ERR_STACKLOW 7
|
||||||
|
#define AMX_ERR_HEAPLOW 8
|
||||||
|
#define AMX_ERR_DIVIDE 11
|
||||||
|
#define AMX_ERR_NOTFOUND 19
|
||||||
|
#define AMX_ERR_PARAMS 25
|
||||||
|
#define AMX_ERR_GENERAL 27
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic invalid handle value
|
||||||
|
*/
|
||||||
|
#define INVALID_HANDLE -1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @section Plugin forward related constants
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop types for plugin forwards
|
||||||
|
*/
|
||||||
|
#define ET_IGNORE 0 //ignore return val
|
||||||
|
#define ET_STOP 1 //stop on PLUGIN_HANDLED
|
||||||
|
#define ET_STOP2 2 //same, except return biggest
|
||||||
|
#define ET_CONTINUE 3 //no stop, return biggest
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameter types for plugin forwards
|
||||||
|
*/
|
||||||
|
#define FP_CELL 0
|
||||||
|
#define FP_FLOAT 1
|
||||||
|
#define FP_STRING 2
|
||||||
|
#define FP_ARRAY 4
|
||||||
|
#define FP_VAL_BYREF 5 //cell & float are handled in the same way
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endsection
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LibType constants
|
||||||
|
*/
|
||||||
|
enum LibType
|
||||||
|
{
|
||||||
|
LibType_Library,
|
||||||
|
LibType_Class
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdminProp constants
|
||||||
|
*/
|
||||||
|
enum AdminProp
|
||||||
|
{
|
||||||
|
AdminProp_Auth = 0,
|
||||||
|
AdminProp_Password,
|
||||||
|
AdminProp_Access,
|
||||||
|
AdminProp_Flags
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HashType constants
|
||||||
|
* To be used on hash_file() and hash_string()
|
||||||
|
*/
|
||||||
|
enum HashType
|
||||||
|
{
|
||||||
|
Hash_Crc32 = 0, // Provides CRC32 hashing
|
||||||
|
Hash_Md5, // Provides MD5 hashing
|
||||||
|
Hash_Sha1, // Provides SHA1 hashing
|
||||||
|
Hash_Sha256, // Provides SHA256 hashing
|
||||||
|
|
||||||
|
Hash_Sha3_224, // Provides SHA3 224 bit hashing
|
||||||
|
Hash_Sha3_256, // Provides SHA3 256 bit hashing
|
||||||
|
Hash_Sha3_384, // Provides SHA3 384 bit hashing
|
||||||
|
Hash_Sha3_512, // Provides SHA3 512 bit hashing
|
||||||
|
|
||||||
|
Hash_Keccak_224, // Provides Keccak 224 bit hashing
|
||||||
|
Hash_Keccak_256, // Provides Keccak 256 bit hashing
|
||||||
|
Hash_Keccak_384, // Provides Keccak 384 bit hashing
|
||||||
|
Hash_Keccak_512 // Provides Keccak 512 bit hashing
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SetTaskFlags constants for set_task_ex()
|
||||||
|
*/
|
||||||
|
enum SetTaskFlags (<<= 1)
|
||||||
|
{
|
||||||
|
SetTask_Once = 0, // None; execute callback after the specified amount of time (Default)
|
||||||
|
SetTask_RepeatTimes = 1, // Repeat timer a set amount of times
|
||||||
|
SetTask_Repeat, // Loop indefinitely until timer is stopped
|
||||||
|
SetTask_AfterMapStart, // Time interval is treated as absolute time after map start
|
||||||
|
SetTask_BeforeMapChange // Time interval is treated as absolute time before map change
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RegisterEventFlags constants for register_event_ex()
|
||||||
|
*/
|
||||||
|
enum RegisterEventFlags (<<= 1)
|
||||||
|
{
|
||||||
|
RegisterEvent_None = 0, // None
|
||||||
|
RegisterEvent_Global = 1, // Global event (sent to every client)
|
||||||
|
RegisterEvent_Single, // Event sent to single client
|
||||||
|
RegisterEvent_OnceForMultiple, // Call only once when repeated to multiple clients
|
||||||
|
RegisterEvent_OnlyDead, // Call only if sent to dead client
|
||||||
|
RegisterEvent_OnlyAlive, // Call only if sent to alive client
|
||||||
|
RegisterEvent_OnlyHuman, // Call only if sent to human client (RegisterEvent_Single required)
|
||||||
|
RegisterEvent_OnlyBots // Call only if sent to bot (RegisterEvent_Single required)
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetPlayerFlags constants for get_players_ex()
|
||||||
|
*/
|
||||||
|
enum GetPlayersFlags (<<= 1)
|
||||||
|
{
|
||||||
|
GetPlayers_None = 0, // No filter (Default)
|
||||||
|
GetPlayers_ExcludeDead = 1, // Do not include dead clients
|
||||||
|
GetPlayers_ExcludeAlive, // Do not include alive clients
|
||||||
|
GetPlayers_ExcludeBots, // Do not include bots
|
||||||
|
GetPlayers_ExcludeHuman, // Do not include human clients
|
||||||
|
GetPlayers_MatchTeam, // Match with team
|
||||||
|
GetPlayers_MatchNameSubstring, // Match with part of name
|
||||||
|
GetPlayers_CaseInsensitive, // Match case insensitive
|
||||||
|
GetPlayers_ExcludeHLTV, // Do not include HLTV proxies
|
||||||
|
GetPlayers_IncludeConnecting // Include connecting clients
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FindPlayerFlags constants for find_player_ex()
|
||||||
|
*/
|
||||||
|
enum FindPlayerFlags (<<= 1)
|
||||||
|
{
|
||||||
|
FindPlayer_None = 0, // None
|
||||||
|
FindPlayer_MatchName = 1, // Match with name
|
||||||
|
FindPlayer_MatchNameSubstring, // Match with name substring
|
||||||
|
FindPlayer_MatchAuthId, // Match with authid
|
||||||
|
FindPlayer_MatchIP, // Match with ip
|
||||||
|
FindPlayer_MatchTeam, // Match with team name
|
||||||
|
FindPlayer_ExcludeDead, // Do not include dead clients
|
||||||
|
FindPlayer_ExcludeAlive, // Do not include alive clients
|
||||||
|
FindPlayer_ExcludeBots, // Do not include bots
|
||||||
|
FindPlayer_ExcludeHuman, // Do not include human clients
|
||||||
|
FindPlayer_LastMatched, // Return last matched client instead of the first
|
||||||
|
FindPlayer_MatchUserId, // Match with userid
|
||||||
|
FindPlayer_CaseInsensitive, // Match case insensitively
|
||||||
|
FindPlayer_IncludeConnecting // Include connecting clients
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constants for client statistics
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
STATSX_KILLS = 0,
|
||||||
|
STATSX_DEATHS,
|
||||||
|
STATSX_HEADSHOTS,
|
||||||
|
STATSX_TEAMKILLS,
|
||||||
|
STATSX_SHOTS,
|
||||||
|
STATSX_HITS,
|
||||||
|
STATSX_DAMAGE,
|
||||||
|
STATSX_RANK,
|
||||||
|
STATSX_MAX_STATS
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constants for get_user_origin()
|
||||||
|
*/
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
Origin_Client = 0, // Client's Origin
|
||||||
|
Origin_Eyes, // Eyes (and Weapon) Origin
|
||||||
|
Origin_AimEndClient, // Aim End Origin from Client's Position
|
||||||
|
Origin_AimEndEyes, // Aim End Origin from Eyes Position
|
||||||
|
Origin_CS_LastBullet // Last Bullet's Origin (Counter-Strike)
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <cstrike_const> // To keep backward compatibility
|
895
amxmodx/scripting/include/amxmisc.inc
Normal file
895
amxmodx/scripting/include/amxmisc.inc
Normal file
|
@ -0,0 +1,895 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
#if defined _amxmisc_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _amxmisc_included
|
||||||
|
|
||||||
|
#if !defined _amxmodx_included
|
||||||
|
#include <amxmodx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the client has any admin flags set
|
||||||
|
*
|
||||||
|
* @param id Client index
|
||||||
|
*
|
||||||
|
* @return 1 if client has any admin flags, 0 otherwise
|
||||||
|
*/
|
||||||
|
stock is_user_admin(id)
|
||||||
|
{
|
||||||
|
new __flags = get_user_flags(id);
|
||||||
|
return (__flags > 0 && !(__flags & ADMIN_USER));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the user can execute the current command by checking the necessary
|
||||||
|
* admin flags and parameter count. Displays a denied access message to the user
|
||||||
|
* if missing privileges or a usage example if too few parameters are provided.
|
||||||
|
*
|
||||||
|
* @note This should be used inside of a command forward as it uses read_argc()
|
||||||
|
* to check the parameter count.
|
||||||
|
*
|
||||||
|
* @param id Client index
|
||||||
|
* @param level Required admin flags
|
||||||
|
* @param cid Command id
|
||||||
|
* @param num Required number of parameters
|
||||||
|
* @param acesssilent If true no denied access message will be printed
|
||||||
|
*
|
||||||
|
* @return 1 if access granted and parameters provided, 0 otherwise
|
||||||
|
*/
|
||||||
|
stock cmd_access(id, level, cid, num, bool:accesssilent = false)
|
||||||
|
{
|
||||||
|
new has_access = 0;
|
||||||
|
if (id == (is_dedicated_server() ? 0 : 1))
|
||||||
|
{
|
||||||
|
has_access = 1;
|
||||||
|
}
|
||||||
|
else if (level == ADMIN_ADMIN)
|
||||||
|
{
|
||||||
|
if (is_user_admin(id))
|
||||||
|
{
|
||||||
|
has_access = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (get_user_flags(id) & level)
|
||||||
|
{
|
||||||
|
has_access = 1;
|
||||||
|
}
|
||||||
|
else if (level == ADMIN_ALL)
|
||||||
|
{
|
||||||
|
has_access = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (has_access == 0)
|
||||||
|
{
|
||||||
|
if (!accesssilent)
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "NO_ACC_COM");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (read_argc() < num)
|
||||||
|
{
|
||||||
|
new hcmd[32], hinfo[128], hflag, bool:info_ml;
|
||||||
|
get_concmd(cid, hcmd, charsmax(hcmd), hflag, hinfo, charsmax(hinfo), level, _, info_ml);
|
||||||
|
|
||||||
|
if (info_ml)
|
||||||
|
{
|
||||||
|
LookupLangKey(hinfo, charsmax(hinfo), hinfo, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
console_print(id, "%L: %s %s", id, "USAGE", hcmd, hinfo);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the client has the specified admin flags.
|
||||||
|
*
|
||||||
|
* @param id Client index
|
||||||
|
* @param level Required admin flags
|
||||||
|
*
|
||||||
|
* @return 1 if client has the admin flags, 0 otherwise
|
||||||
|
*/
|
||||||
|
stock access(id, level)
|
||||||
|
{
|
||||||
|
if (level == ADMIN_ADMIN)
|
||||||
|
{
|
||||||
|
return is_user_admin(id);
|
||||||
|
}
|
||||||
|
else if (level == ADMIN_ALL)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (get_user_flags(id) & level);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cmd_target flags
|
||||||
|
*/
|
||||||
|
#define CMDTARGET_OBEY_IMMUNITY (1<<0) // Obey immunity
|
||||||
|
#define CMDTARGET_ALLOW_SELF (1<<1) // Allow self targeting
|
||||||
|
#define CMDTARGET_ONLY_ALIVE (1<<2) // Target must be alive
|
||||||
|
#define CMDTARGET_NO_BOTS (1<<3) // Target can't be a bot
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* @note 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.
|
||||||
|
* @note 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.
|
||||||
|
* @note 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.
|
||||||
|
*
|
||||||
|
* @param id Client index of admin performing an action
|
||||||
|
* @param arg Target pattern
|
||||||
|
* @param flags Filtering flags, see CMDTARGET_* constants above
|
||||||
|
*
|
||||||
|
* @return Client index, or 0 if no or multiple clients matched
|
||||||
|
*/
|
||||||
|
stock cmd_target(id, const arg[], flags = CMDTARGET_OBEY_IMMUNITY)
|
||||||
|
{
|
||||||
|
new player = find_player("bl", arg);
|
||||||
|
if (player)
|
||||||
|
{
|
||||||
|
if (player != find_player("blj", arg))
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "MORE_CL_MATCHT");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((player = find_player("c", arg)) == 0 && arg[0] == '#' && arg[1])
|
||||||
|
{
|
||||||
|
player = find_player("k", str_to_num(arg[1]));
|
||||||
|
}
|
||||||
|
if (!player)
|
||||||
|
{
|
||||||
|
console_print(id, "%L", id, "CL_NOT_FOUND");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (flags & CMDTARGET_OBEY_IMMUNITY)
|
||||||
|
{
|
||||||
|
if ((get_user_flags(player) & ADMIN_IMMUNITY) && ((flags & CMDTARGET_ALLOW_SELF) ? (id != player) : true))
|
||||||
|
{
|
||||||
|
new imname[MAX_NAME_LENGTH];
|
||||||
|
get_user_name(player, imname, charsmax(imname));
|
||||||
|
console_print(id, "%L", id, "CLIENT_IMM", imname);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flags & CMDTARGET_ONLY_ALIVE)
|
||||||
|
{
|
||||||
|
if (!is_user_alive(player))
|
||||||
|
{
|
||||||
|
new imname[MAX_NAME_LENGTH];
|
||||||
|
get_user_name(player, imname, charsmax(imname));
|
||||||
|
console_print(id, "%L", id, "CANT_PERF_DEAD", imname);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flags & CMDTARGET_NO_BOTS)
|
||||||
|
{
|
||||||
|
if (is_user_bot(player))
|
||||||
|
{
|
||||||
|
new imname[MAX_NAME_LENGTH];
|
||||||
|
get_user_name(player, imname, charsmax(imname));
|
||||||
|
console_print(id, "%L", id, "CANT_PERF_BOT", imname);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Standard method to show admin activity to clients connected to the server.
|
||||||
|
* This depends on the amx_show_activity cvar. See documentation for more details.
|
||||||
|
*
|
||||||
|
* @param id Client index performing the action
|
||||||
|
* @param name Name of client performing the action
|
||||||
|
* @param fmt Formatting rules
|
||||||
|
* @param ... Variable number of formatting parameters
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
stock show_activity(id, const name[], const fmt[], any:...)
|
||||||
|
{
|
||||||
|
static __amx_show_activity;
|
||||||
|
if (__amx_show_activity == 0)
|
||||||
|
{
|
||||||
|
__amx_show_activity = get_cvar_pointer("amx_show_activity");
|
||||||
|
|
||||||
|
// if still not found, then register the cvar as a dummy
|
||||||
|
if (__amx_show_activity == 0)
|
||||||
|
{
|
||||||
|
__amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new prefix[10];
|
||||||
|
if (is_user_admin(id))
|
||||||
|
{
|
||||||
|
copy(prefix, charsmax(prefix), "ADMIN");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
copy(prefix, charsmax(prefix), "PLAYER");
|
||||||
|
}
|
||||||
|
new buffer[512];
|
||||||
|
vformat(buffer, charsmax(buffer), fmt, 4);
|
||||||
|
|
||||||
|
switch (get_pcvar_num(__amx_show_activity))
|
||||||
|
{
|
||||||
|
case 5: // hide name only to admins, show nothing to normal users
|
||||||
|
{
|
||||||
|
for (new i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i))
|
||||||
|
{
|
||||||
|
if (is_user_admin(i))
|
||||||
|
{
|
||||||
|
client_print(i, print_chat, "%L: %s", i, prefix, buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 4: // show name only to admins, show nothing to normal users
|
||||||
|
{
|
||||||
|
for (new i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i))
|
||||||
|
{
|
||||||
|
if (is_user_admin(i))
|
||||||
|
{
|
||||||
|
client_print(i, print_chat, "%L %s: %s", i, prefix, name, buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 3: // show name only to admins, hide name from normal users
|
||||||
|
{
|
||||||
|
for (new i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i))
|
||||||
|
{
|
||||||
|
if (is_user_admin(i))
|
||||||
|
{
|
||||||
|
client_print(i, print_chat, "%L %s: %s", i, prefix, name, buffer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
client_print(i, print_chat, "%L: %s", i, prefix, buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 2: // show name to all
|
||||||
|
{
|
||||||
|
client_print(0, print_chat, "%L %s: %s", LANG_PLAYER, prefix , name , buffer);
|
||||||
|
}
|
||||||
|
case 1: // hide name to all
|
||||||
|
{
|
||||||
|
client_print(0, print_chat, "%L: %s", LANG_PLAYER, prefix, buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Standard method to show admin activity to a single client.
|
||||||
|
* This depends on the amx_show_activity cvar. See documentation for more details.
|
||||||
|
*
|
||||||
|
* @param idtarget Client index to display message to
|
||||||
|
* @param id Client index performing the action
|
||||||
|
* @param name Name of client performing the action
|
||||||
|
* @param fmt Formatting rules
|
||||||
|
* @param ... Variable number of formatting parameters
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
stock show_activity_id(idtarget, idadmin, const name[], const fmt[], any:...)
|
||||||
|
{
|
||||||
|
if (idtarget == 0 || !is_user_connected(idtarget))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __amx_show_activity;
|
||||||
|
if (__amx_show_activity == 0)
|
||||||
|
{
|
||||||
|
__amx_show_activity = get_cvar_pointer("amx_show_activity");
|
||||||
|
|
||||||
|
// if still not found, then register the cvar as a dummy
|
||||||
|
if (__amx_show_activity == 0)
|
||||||
|
{
|
||||||
|
__amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static prefix[10];
|
||||||
|
if (is_user_admin(idadmin))
|
||||||
|
{
|
||||||
|
copy(prefix, charsmax(prefix), "ADMIN");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
copy(prefix, charsmax(prefix), "PLAYER");
|
||||||
|
}
|
||||||
|
|
||||||
|
static buffer[512];
|
||||||
|
vformat(buffer, charsmax(buffer), fmt, 5);
|
||||||
|
|
||||||
|
switch (get_pcvar_num(__amx_show_activity))
|
||||||
|
{
|
||||||
|
case 5: // hide name only to admins, show nothing to normal users
|
||||||
|
{
|
||||||
|
if (is_user_admin(idtarget))
|
||||||
|
{
|
||||||
|
client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 4: // show name only to admins, show nothing to normal users
|
||||||
|
{
|
||||||
|
if (is_user_admin(idtarget))
|
||||||
|
{
|
||||||
|
client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 3: // show name only to admins, hide name from normal users
|
||||||
|
{
|
||||||
|
if (is_user_admin(idtarget))
|
||||||
|
{
|
||||||
|
client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 2: // show name to all
|
||||||
|
{
|
||||||
|
client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer);
|
||||||
|
}
|
||||||
|
case 1: // hide name to all
|
||||||
|
{
|
||||||
|
client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Standard method to show activity to one single client with normal language keys.
|
||||||
|
* These keys need to be in the format of standard AMXX keys:
|
||||||
|
* eg: ADMIN_KICK_1 = ADMIN: kick %s
|
||||||
|
* ADMIN_KICK_2 = ADMIN %s: kick %s
|
||||||
|
* This depends on the amx_show_activity cvar. See documentation for more details.
|
||||||
|
*
|
||||||
|
* @param KeyWithoutName The language key that does not have the name field.
|
||||||
|
* @param KeyWithName The language key that does have the name field.
|
||||||
|
* @param __AdminName The name of the person doing the action.
|
||||||
|
* @extra Pass any extra format arguments for the language key in the variable arguments list.
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___AdminName[], any:...)
|
||||||
|
{
|
||||||
|
// The variable gets used via vformat, but the compiler doesn't know that, so it still cries.
|
||||||
|
#pragma unused ___AdminName
|
||||||
|
static __amx_show_activity;
|
||||||
|
if (__amx_show_activity == 0)
|
||||||
|
{
|
||||||
|
__amx_show_activity = get_cvar_pointer("amx_show_activity");
|
||||||
|
|
||||||
|
// if still not found, then register the cvar as a dummy
|
||||||
|
if (__amx_show_activity == 0)
|
||||||
|
{
|
||||||
|
__amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new buffer[512];
|
||||||
|
new keyfmt[256];
|
||||||
|
new i;
|
||||||
|
|
||||||
|
switch (get_pcvar_num(__amx_show_activity))
|
||||||
|
{
|
||||||
|
case 5: // hide name to admins, display nothing to normal players
|
||||||
|
{
|
||||||
|
while (i++ < MaxClients)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i))
|
||||||
|
{
|
||||||
|
if (is_user_admin(i))
|
||||||
|
{
|
||||||
|
LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i);
|
||||||
|
|
||||||
|
// skip the "adminname" argument if not showing name
|
||||||
|
vformat(buffer, charsmax(buffer), keyfmt, 4);
|
||||||
|
client_print(i, print_chat, "%s", buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 4: // show name only to admins, display nothing to normal players
|
||||||
|
{
|
||||||
|
while (i++ < MaxClients)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i))
|
||||||
|
{
|
||||||
|
if (is_user_admin(i))
|
||||||
|
{
|
||||||
|
LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i);
|
||||||
|
vformat(buffer, charsmax(buffer), keyfmt, 3);
|
||||||
|
client_print(i, print_chat, "%s", buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 3: // show name only to admins, hide name from normal users
|
||||||
|
{
|
||||||
|
while (i++ < MaxClients)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i))
|
||||||
|
{
|
||||||
|
if (is_user_admin(i))
|
||||||
|
{
|
||||||
|
LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i);
|
||||||
|
vformat(buffer, charsmax(buffer), keyfmt, 3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i);
|
||||||
|
|
||||||
|
// skip the "adminname" argument if not showing name
|
||||||
|
vformat(buffer, charsmax(buffer), keyfmt, 4);
|
||||||
|
}
|
||||||
|
client_print(i, print_chat, "%s", buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 2: // show name to all users
|
||||||
|
{
|
||||||
|
while (i++ < MaxClients)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i))
|
||||||
|
{
|
||||||
|
LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i);
|
||||||
|
vformat(buffer, charsmax(buffer), keyfmt, 3);
|
||||||
|
client_print(i, print_chat, "%s", buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 1: // hide name from all users
|
||||||
|
{
|
||||||
|
while (i++ < MaxClients)
|
||||||
|
{
|
||||||
|
if (is_user_connected(i))
|
||||||
|
{
|
||||||
|
LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i);
|
||||||
|
|
||||||
|
// skip the "adminname" argument if not showing name
|
||||||
|
vformat(buffer, charsmax(buffer), keyfmt, 4);
|
||||||
|
client_print(i, print_chat, "%s", buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the mod running on the server supports colored menus.
|
||||||
|
*
|
||||||
|
* @note The full list of mods supporting colored menus:
|
||||||
|
* Counter-Strike, Counter-Strike: Condition Zero, Deathmatch Classic,
|
||||||
|
* Day of Defeat, Team Fortress Classic and Half-Life: Deathmatch.
|
||||||
|
* @note Since this is a stock and compiled into the plugin, the list of
|
||||||
|
* supported mods will not update and require recompilation of the plugin
|
||||||
|
* if the list ever changed.
|
||||||
|
*
|
||||||
|
* @return 1 if colored menus are supported, 0 otherwise
|
||||||
|
*/
|
||||||
|
stock colored_menus()
|
||||||
|
{
|
||||||
|
static ColoredMenus = -1;
|
||||||
|
|
||||||
|
if (ColoredMenus == -1)
|
||||||
|
{
|
||||||
|
new const ModNames[][] = { "cstrike", "czero", "dmc", "dod", "tfc", "valve" };
|
||||||
|
new ModName[32];
|
||||||
|
|
||||||
|
get_modname(ModName, charsmax(ModName));
|
||||||
|
|
||||||
|
for (new Iterator = 0; Iterator < sizeof(ModNames); Iterator++)
|
||||||
|
{
|
||||||
|
if (equal(ModName, ModNames[Iterator]))
|
||||||
|
{
|
||||||
|
ColoredMenus = 1;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ColoredMenus == -1)
|
||||||
|
ColoredMenus = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ColoredMenus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the mod running on the server is a version of Counter-Strike.
|
||||||
|
*
|
||||||
|
* @return 1 if mod is Counter-Strike, 0 otherwise
|
||||||
|
*/
|
||||||
|
stock cstrike_running()
|
||||||
|
{
|
||||||
|
new mod_name[32];
|
||||||
|
get_modname(mod_name, charsmax(mod_name));
|
||||||
|
|
||||||
|
return (equal(mod_name, "cstrike") || equal(mod_name, "czero") || equal(mod_name, "csv15") || equal(mod_name, "cs13"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the server is running a specific mod.
|
||||||
|
*
|
||||||
|
* @param mod Mod name to check for
|
||||||
|
*
|
||||||
|
* @return 1 if mod name matches, 0 otherwise
|
||||||
|
*/
|
||||||
|
stock is_running(const mod[])
|
||||||
|
{
|
||||||
|
new mod_name[32];
|
||||||
|
get_modname(mod_name, charsmax(mod_name));
|
||||||
|
|
||||||
|
return equal(mod_name, mod);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the path to the AMXX base directory.
|
||||||
|
*
|
||||||
|
* @param name Buffer to copy path to
|
||||||
|
* @param len Maximum buffer size
|
||||||
|
*
|
||||||
|
* @return Number of cells written to buffer
|
||||||
|
*/
|
||||||
|
stock get_basedir(name[], len)
|
||||||
|
{
|
||||||
|
return get_localinfo("amxx_basedir", name, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the path to the AMXX configs directory.
|
||||||
|
*
|
||||||
|
* @param name Buffer to copy path to
|
||||||
|
* @param len Maximum buffer size
|
||||||
|
*
|
||||||
|
* @return Number of cells written to buffer
|
||||||
|
*/
|
||||||
|
stock get_configsdir(name[], len)
|
||||||
|
{
|
||||||
|
return get_localinfo("amxx_configsdir", name, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the path to the AMXX data directory.
|
||||||
|
*
|
||||||
|
* @param name Buffer to copy path to
|
||||||
|
* @param len Maximum buffer size
|
||||||
|
*
|
||||||
|
* @return Number of cells written to buffer
|
||||||
|
*/
|
||||||
|
stock get_datadir(name[], len)
|
||||||
|
{
|
||||||
|
return get_localinfo("amxx_datadir", name, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides a shorthand to register a working menu.
|
||||||
|
*
|
||||||
|
* @note Combines the necessary calls to register_menuid() and
|
||||||
|
* register_menucmd() into a single function.
|
||||||
|
*
|
||||||
|
* @param title Menu name
|
||||||
|
* @param keys Key flags
|
||||||
|
* @param function Callback function
|
||||||
|
* @param outside Catch menus outside the calling plugin
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid callback function is specified, an error will
|
||||||
|
* be thrown.
|
||||||
|
*/
|
||||||
|
stock register_menu(const title[], keys, const function[], outside = 0)
|
||||||
|
{
|
||||||
|
register_menucmd(register_menuid(title, outside), keys, function);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alias to get_configsdir provided for backwards compatibility. Originally
|
||||||
|
* intended to retrieve the AMXX custom directory.
|
||||||
|
*
|
||||||
|
* @deprecated Should not be used as the concept of a custom directory does no
|
||||||
|
* longer exists in AMXX.
|
||||||
|
*
|
||||||
|
* @param name Buffer to copy path to
|
||||||
|
* @param len Maximum buffer size
|
||||||
|
*
|
||||||
|
* @return Number of cells written to buffer
|
||||||
|
*/
|
||||||
|
#pragma deprecated The concept of a custom directory no longer exists in AMXX. Do not use.
|
||||||
|
stock get_customdir(name[], len)
|
||||||
|
{
|
||||||
|
return get_configsdir(name, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a menu item/command to the admin menu (amxmodmenu) handled by the
|
||||||
|
* "Menus Front-End" plugin, if it is loaded.
|
||||||
|
*
|
||||||
|
* @param MENU_TEXT Item text that will be displayed in the menu
|
||||||
|
* @param MENU_CMD Command that will be executed on the client
|
||||||
|
* @param MENU_ACCESS Admin access required for menu command
|
||||||
|
* @param MENU_PLUGIN Case-insensitive name or filename of plugin providing
|
||||||
|
* the menu command
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
stock AddMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[])
|
||||||
|
{
|
||||||
|
AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a menu item/command to the client menu (amx_menu) handled by the
|
||||||
|
* "Menus Front-End" plugin, if it is loaded. Items should be accessible by
|
||||||
|
* non-admins.
|
||||||
|
*
|
||||||
|
* @param MENU_TEXT Item text that will be displayed in the menu
|
||||||
|
* @param MENU_CMD Command that will be executed on the client
|
||||||
|
* @param MENU_ACCESS Admin access required for menu command
|
||||||
|
* @param MENU_PLUGIN Case-insensitive name or filename of plugin providing
|
||||||
|
* the menu command
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
stock AddClientMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[])
|
||||||
|
{
|
||||||
|
AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function used by AddMenuItem() and AddClientMenuItem()
|
||||||
|
*
|
||||||
|
* @param MENU_TEXT Item text that will be displayed in the menu
|
||||||
|
* @param MENU_CMD Command that will be executed on the client
|
||||||
|
* @param MENU_ACCESS Admin access required for menu command
|
||||||
|
* @param MENU_PLUGIN Case-insensitive name or filename of plugin
|
||||||
|
* providing the menu command
|
||||||
|
* @param ADD_TO_CLIENT_MENU If true adds command to client menu, false adds
|
||||||
|
* to admin menu
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
stock AddMenuItem_call(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[], const bool:ADD_TO_CLIENT_MENU)
|
||||||
|
{
|
||||||
|
new pluginid = is_plugin_loaded("Menus Front-End");
|
||||||
|
if (pluginid == -1)
|
||||||
|
{
|
||||||
|
log_amx("Can't add menu item ^"%s^" from plugin ^"%s^" to menu set because the Menus Front-End plugin itself is not loaded!", MENU_TEXT, MENU_PLUGIN);
|
||||||
|
return; // Menus Front-End doesn't exist, return.
|
||||||
|
}
|
||||||
|
|
||||||
|
new filename[64], b[1];
|
||||||
|
get_plugin(pluginid, filename, charsmax(filename), b, charsmax(b), b, charsmax(b), b, charsmax(b), b, charsmax(b));
|
||||||
|
|
||||||
|
new status = callfunc_begin(ADD_TO_CLIENT_MENU ? "AddClientMenu" : "AddMenu", filename);
|
||||||
|
new bool:failed = true;
|
||||||
|
switch (status)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
failed = false;
|
||||||
|
}
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
log_amx("Run time error! (AddMenuItem_call failed)");
|
||||||
|
}
|
||||||
|
case -2:
|
||||||
|
{
|
||||||
|
log_amx("Function not found! (AddMenuItem_call failed)");
|
||||||
|
}
|
||||||
|
case -1:
|
||||||
|
{
|
||||||
|
log_amx("Plugin not found! (AddMenuItem_call failed)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (failed)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Item text
|
||||||
|
callfunc_push_str(MENU_TEXT);
|
||||||
|
// Cmd
|
||||||
|
callfunc_push_str(MENU_CMD);
|
||||||
|
// Access
|
||||||
|
callfunc_push_int(MENU_ACCESS);
|
||||||
|
// Menu exists in this plugin
|
||||||
|
callfunc_push_str(MENU_PLUGIN);
|
||||||
|
|
||||||
|
callfunc_end();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes an offset from a given value while constraining it between the
|
||||||
|
* specified bounds, rolling over if necessary.
|
||||||
|
*
|
||||||
|
* @note Example: The range is 1-5 and the base value (seed) is 3, the offset
|
||||||
|
* that the value should be moved by is also 3. Offsetting the value by 3
|
||||||
|
* would result in 6, but it is to be constrained between 1 and 5. With
|
||||||
|
* clamp() this would result in 5, but this function rolls the value over
|
||||||
|
* and returns 1 instead.
|
||||||
|
*
|
||||||
|
* @param low Lower bound
|
||||||
|
* @param high Higher bound
|
||||||
|
* @param seed Base value
|
||||||
|
* @param offset Offset to move
|
||||||
|
*
|
||||||
|
* @return Computed offset value between specified bounds
|
||||||
|
*/
|
||||||
|
stock constraint_offset(low, high, seed, offset)
|
||||||
|
{
|
||||||
|
new numElements = high - low + 1;
|
||||||
|
offset += seed - low;
|
||||||
|
|
||||||
|
if (offset >= 0)
|
||||||
|
{
|
||||||
|
return low + (offset % numElements);
|
||||||
|
}
|
||||||
|
|
||||||
|
return high - (abs(offset) % numElements) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the client has any of the specified admin flags.
|
||||||
|
*
|
||||||
|
* @param id Client index
|
||||||
|
* @param flags Flag string
|
||||||
|
*
|
||||||
|
* @return 1 if the user has any of the specified flags, 0 otherwise
|
||||||
|
*/
|
||||||
|
stock has_flag(id, const flags[])
|
||||||
|
{
|
||||||
|
return (get_user_flags(id) & read_flags(flags));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the client has all of the specified admin flags.
|
||||||
|
*
|
||||||
|
* @param id Client index
|
||||||
|
* @param flags Flag string
|
||||||
|
*
|
||||||
|
* @return 1 if the user has all of the specified flags, 0 otherwise
|
||||||
|
*/
|
||||||
|
stock has_all_flags(id, const flags[])
|
||||||
|
{
|
||||||
|
new FlagsNumber = read_flags(flags);
|
||||||
|
return ((get_user_flags(id) & FlagsNumber) == FlagsNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the client's menu.
|
||||||
|
*
|
||||||
|
* @note This is a wrapper around show_menu() for the sake of readability.
|
||||||
|
*
|
||||||
|
* @param index Client to reset menu of, 0 to reset all clients
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
stock reset_menu(index)
|
||||||
|
{
|
||||||
|
show_menu(index, 0, "", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calls a function after a specified time has elapsed.
|
||||||
|
*
|
||||||
|
* @param time Time interval to assign
|
||||||
|
* @param function Function to execute
|
||||||
|
* @param id Task id to assign
|
||||||
|
* @param parameter Data to pass through to callback
|
||||||
|
* @param len Size of data
|
||||||
|
* @param flags Optional flags (enum SetTaskFlags); valid flags are:
|
||||||
|
* SetTask_Once - Execute callback once (Default)
|
||||||
|
* SetTask_RepeatTimes - repeat timer a set amount of times
|
||||||
|
* SetTask_Repeat - loop indefinitely until timer is stopped
|
||||||
|
* SetTask_AfterMapStart - time interval is treated as absolute
|
||||||
|
* time after map start
|
||||||
|
* SetTask_BeforeMapChange - time interval is treated as absolute
|
||||||
|
* time before map change
|
||||||
|
* @param repeat If the SetTask_RepeatTimes flag is set, the task will be repeated this
|
||||||
|
* many times
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid callback function is provided, an error is
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
stock set_task_ex(Float:time, const function[], id = 0, const any:parameter[] = "", len = 0, SetTaskFlags:flags = SetTask_Once, repeat = 0)
|
||||||
|
{
|
||||||
|
new strFlags[2]; // There should never be a need to set more than 1 flag
|
||||||
|
get_flags(_:flags, strFlags, charsmax(strFlags));
|
||||||
|
set_task(time, function, id, parameter, len, strFlags, repeat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores a filtered list of client indexes to an array.
|
||||||
|
*
|
||||||
|
* @note Example retrieving all alive CTs:
|
||||||
|
* get_players_ex(players, num, GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "CT")
|
||||||
|
*
|
||||||
|
* @param players Array to store indexes to
|
||||||
|
* @param num Variable to store number of indexes to
|
||||||
|
* @param flags Optional filtering flags (enum GetPlayersFlags); valid flags are:
|
||||||
|
* GetPlayers_None - No filter (Default)
|
||||||
|
* GetPlayers_ExcludeDead - do not include dead clients
|
||||||
|
* GetPlayers_ExcludeAlive - do not include alive clients
|
||||||
|
* GetPlayers_ExcludeBots - do not include bots
|
||||||
|
* GetPlayers_ExcludeHuman - do not include human clients
|
||||||
|
* GetPlayers_MatchTeam - match with team
|
||||||
|
* GetPlayers_MatchNameSubstring - match with part of name
|
||||||
|
* GetPlayers_CaseInsensitive - match case insensitive
|
||||||
|
* GetPlayers_ExcludeHLTV - do not include HLTV proxies
|
||||||
|
* GetPlayers_IncludeConnecting - include connecting clients
|
||||||
|
* @param team String to match against if the "e" or "f" flag is specified
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
stock get_players_ex(players[MAX_PLAYERS] = {}, &num, GetPlayersFlags:flags = GetPlayers_None, const team[] = "")
|
||||||
|
{
|
||||||
|
new strFlags[10];
|
||||||
|
get_flags(_:flags, strFlags, charsmax(strFlags));
|
||||||
|
get_players(players, num, strFlags, team);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of clients on the server that match the specified flags.
|
||||||
|
*
|
||||||
|
* @note Example retrieving all alive CTs:
|
||||||
|
* new AliveCt = get_playersnum_ex(GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "CT")
|
||||||
|
*
|
||||||
|
* @param flags Optional filtering flags (enum GetPlayersFlags); valid flags are:
|
||||||
|
* GetPlayers_None - No filter (Default)
|
||||||
|
* GetPlayers_ExcludeDead - do not include dead clients
|
||||||
|
* GetPlayers_ExcludeAlive - do not include alive clients
|
||||||
|
* GetPlayers_ExcludeBots - do not include bots
|
||||||
|
* GetPlayers_ExcludeHuman - do not include human clients
|
||||||
|
* GetPlayers_MatchTeam - match with team
|
||||||
|
* GetPlayers_MatchNameSubstring - match with part of name
|
||||||
|
* GetPlayers_CaseInsensitive - match case insensitive
|
||||||
|
* GetPlayers_ExcludeHLTV - do not include HLTV proxies
|
||||||
|
* GetPlayers_IncludeConnecting - include connecting clients
|
||||||
|
* @param team String to match against if the GetPlayers_MatchTeam or GetPlayers_MatchNameSubstring flag is specified
|
||||||
|
*
|
||||||
|
* @return Number of clients on the server that match the specified flags
|
||||||
|
*/
|
||||||
|
stock get_playersnum_ex(GetPlayersFlags:flags = GetPlayers_None, const team[] = "")
|
||||||
|
{
|
||||||
|
new PlayersNum;
|
||||||
|
get_players_ex(_, PlayersNum, flags, team);
|
||||||
|
return PlayersNum;
|
||||||
|
}
|
3438
amxmodx/scripting/include/amxmodx.inc
Normal file
3438
amxmodx/scripting/include/amxmodx.inc
Normal file
File diff suppressed because it is too large
Load Diff
20
amxmodx/scripting/include/amxmodx_version.inc
Normal file
20
amxmodx/scripting/include/amxmodx_version.inc
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
#if defined _amxmodx_version_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _amxmodx_version_included
|
||||||
|
|
||||||
|
#define AMXX_VERSION_TAG ""
|
||||||
|
#define AMXX_VERSION_CSET "9fbf91d"
|
||||||
|
#define AMXX_VERSION_MAJOR "1"
|
||||||
|
#define AMXX_VERSION_MAJOR_NUM 1
|
||||||
|
#define AMXX_VERSION_MINOR "10"
|
||||||
|
#define AMXX_VERSION_MINOR_NUM 10
|
||||||
|
#define AMXX_VERSION_RELEASE "0"
|
||||||
|
#define AMXX_VERSION_LOCAL_REV_NUM 5417
|
||||||
|
#define AMXX_VERSION_LOCAL_REV "5417"
|
||||||
|
#define AMXX_VERSION 1.100
|
||||||
|
#define AMXX_VERSION_NUM 200
|
||||||
|
|
||||||
|
stock const AMXX_VERSION_STR[] = "1.10.0.5417";
|
||||||
|
|
43
amxmodx/scripting/include/amxxarch.inc
Normal file
43
amxmodx/scripting/include/amxxarch.inc
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* See LICENSE.TXT file for more information.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#if defined _AmxxArch_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _AmxxArch_included
|
||||||
|
|
||||||
|
#if AMXX_VERSION_NUM >= 175
|
||||||
|
#pragma reqlib AmxxArch
|
||||||
|
#if !defined AMXMODX_NOAUTOLOAD
|
||||||
|
#pragma loadlib AmxxArch
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#pragma library AmxxArch
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define AA_NO_ERROR 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @param filepath Path to the file
|
||||||
|
* @param outdir Directory where the archive will be unpacked
|
||||||
|
* @param callback Callback function (example: public OnComplete(idcaller, error))
|
||||||
|
* @param idcaller player id or 0
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
native AA_Unarchive( const filepath[], const outdir[], const callback[], const idcaller = 0);
|
525
amxmodx/scripting/include/cellarray.inc
Normal file
525
amxmodx/scripting/include/cellarray.inc
Normal file
|
@ -0,0 +1,525 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
#if defined _cellarray_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _cellarray_included
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cellarray tag declaration
|
||||||
|
*
|
||||||
|
* @note These dynamic arrays are intended to be used for a form of global
|
||||||
|
* storage without requiring a #define that needs to be increased each
|
||||||
|
* time the plugin author requires more storage. These are not designed
|
||||||
|
* to be a full replacement for normal arrays, as those are faster and
|
||||||
|
* should be used whenever possible.
|
||||||
|
* @note Plugins are responsible for freeing all Array handles they acquire,
|
||||||
|
* including those from ArrayClone. Failing to free handles will result
|
||||||
|
* in the plugin and AMXX leaking memory.
|
||||||
|
*/
|
||||||
|
enum Array
|
||||||
|
{
|
||||||
|
Invalid_Array = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of cells required to fit a string of the specified size
|
||||||
|
* (including the null terminator).
|
||||||
|
*
|
||||||
|
* @param size Number of bytes.
|
||||||
|
*
|
||||||
|
* @return Minimum number of cells required to fit the byte count.
|
||||||
|
*/
|
||||||
|
stock ByteCountToCells(size)
|
||||||
|
{
|
||||||
|
if (!size)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (size + 3) / 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a handle to a dynamically sized array.
|
||||||
|
*
|
||||||
|
* @note It is very important that the provided cellsize matches up with the
|
||||||
|
* buffer sizes that are passed with subsequent Array[Get|Set|Push] calls.
|
||||||
|
* @note Initially the "reserved" parameter was intended to create blank entries
|
||||||
|
* that would immediately be usable with Array[Get|Set] functions. This
|
||||||
|
* functionality was never working as intended, and can now be achieved
|
||||||
|
* using ArrayResize().
|
||||||
|
*
|
||||||
|
* @param cellsize Size of each array entry in cells
|
||||||
|
* @param reserved Pre-allocates space in the array for the specified
|
||||||
|
* number of items. The items are not valid to read or set
|
||||||
|
* until they have actually been pushed into the array.
|
||||||
|
*
|
||||||
|
* @return New array handle, which must be freed via ArrayDestroy()
|
||||||
|
* @error If an invalid cellsize is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native Array:ArrayCreate(cellsize = 1, reserved = 32);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clones an array, returning a new handle with the same size and data.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
*
|
||||||
|
* @return Handle to the cloned array on success, 0 otherwise
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native Array:ArrayClone(Array:which);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears all entries from the array.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error Invalid handle
|
||||||
|
*/
|
||||||
|
native ArrayClear(Array:which);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of elements in the array.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
*
|
||||||
|
* @return Number of elements in the array
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native ArraySize(Array:which);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resizes an array.
|
||||||
|
*
|
||||||
|
* @note If the size is smaller than the current array size the array is
|
||||||
|
* truncated and data lost.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param newsize New size
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle is provided or the resizing
|
||||||
|
* operation runs out of memory, an error will be thrown.
|
||||||
|
*/
|
||||||
|
native bool:ArrayResize(Array:which, newsize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves an array of data from a cellarray.
|
||||||
|
*
|
||||||
|
* @note If the size parameter is specified as -1 the output buffer has to match
|
||||||
|
* the size the array was created with.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param output Buffer to copy value to
|
||||||
|
* @param size If not set, assumes the buffer size is equal to the
|
||||||
|
* cellsize. Otherwise, the specified size is used.
|
||||||
|
*
|
||||||
|
* @return Number of cells copied
|
||||||
|
* @error If an invalid handle or index is provided an error will
|
||||||
|
* be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayGetArray(Array:which, item, any:output[], size = -1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a single cell of data from an array
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param block If the array has a cellsize >1 this optionally specifies
|
||||||
|
* which block to read from
|
||||||
|
* @param asChar If true reads the value as a byte instead of a cell
|
||||||
|
*
|
||||||
|
* @return Integer value
|
||||||
|
* @error If an invalid handle, index or block is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native any:ArrayGetCell(Array:which, item, block = 0, bool:asChar = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returieves string data from an array.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param output Buffer to copy value to
|
||||||
|
* @param size Maximum size of the buffer
|
||||||
|
*
|
||||||
|
* @return Number of characters copied
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayGetString(Array:which, item, output[], size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fills an item's data with the contents of an array.
|
||||||
|
*
|
||||||
|
* @note If the size parameter is specified as -1 the input buffer has to match
|
||||||
|
* the size the array was created with.
|
||||||
|
* @note The item index must already be valid. Use ArrayPushArray to create
|
||||||
|
* a new array item in the cellarray.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input Array to copy to the cellarray
|
||||||
|
* @param size If not set, assumes the buffer size is equal to the
|
||||||
|
* cellsize. Otherwise, the specified size is used.
|
||||||
|
*
|
||||||
|
* @return Number of cells copied
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArraySetArray(Array:which, item, const any:input[], size =-1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets an item's data to a single cell value.
|
||||||
|
*
|
||||||
|
* @note The item index must already be valid. Use ArrayPushArray to create
|
||||||
|
* a new array item in the cellarray.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input Value to set
|
||||||
|
* @param block If the array has a cellsize >1 this optionally specifies
|
||||||
|
* which block to write to
|
||||||
|
* @param asChar If true writes the value as a byte instead of a cell
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle, index or block is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArraySetCell(Array:which, item, any:input, block = 0, bool:asChar = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets an item's data to a string value.
|
||||||
|
*
|
||||||
|
* @note The input will be truncated if it is longer than the cellsize the array
|
||||||
|
* was created with.
|
||||||
|
* @note The item index must already be valid. Use ArrayPushString to create
|
||||||
|
* a new array item in the cellarray.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input String to copy to the array
|
||||||
|
*
|
||||||
|
* @return Number of characters copied
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArraySetString(Array:which, item, const input[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item at the end of the cellarray and copies the provided array
|
||||||
|
* into it.
|
||||||
|
*
|
||||||
|
* @note The input will be truncated if it is bigger than the cellsize the array
|
||||||
|
* was created with.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param input Array to copy to the cellarray
|
||||||
|
* @param size If not set, assumes the buffer size is equal to the
|
||||||
|
* cellsize. Otherwise, the specified size is used.
|
||||||
|
*
|
||||||
|
* @return Index of the new entry
|
||||||
|
* @error If an invalid handle is provided or the resizing
|
||||||
|
* operation runs out of memory, an error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayPushArray(Array:which, const any:input[], size = -1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item at the end of the array and sets the item's single cell
|
||||||
|
* value.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param input Value to set
|
||||||
|
*
|
||||||
|
* @return Index of the new entry
|
||||||
|
* @error If an invalid handle is provided or the resizing
|
||||||
|
* operation runs out of memory, an error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayPushCell(Array:which, any:input);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item at the end of the array and copies the provided string
|
||||||
|
* into it.
|
||||||
|
*
|
||||||
|
* @note The input will be truncated if it is longer than the cellsize the array
|
||||||
|
* was created with.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param input String to copy to the array
|
||||||
|
*
|
||||||
|
* @return Index of the new entry
|
||||||
|
* @error If an invalid handle is provided or the resizing
|
||||||
|
* operation runs out of memory, an error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayPushString(Array:which, const input[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item behind the specified item and copies the provided array
|
||||||
|
* into it. All items beyond it get shifted up by one.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input Array to copy to the cellarray
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayInsertArrayAfter(Array:which, item, const any:input[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item behind the specified item and sets the item's single cell
|
||||||
|
* value. All items beyond it get shifted up by one.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input Value to set
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayInsertCellAfter(Array:which, item, any:input);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item behind the specified item and copies the provided string
|
||||||
|
* into it. All items beyond it get shifted up by one.
|
||||||
|
*
|
||||||
|
* @note The input will be truncated if it is longer than the cellsize the array
|
||||||
|
* was created with.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input String to copy to the array
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayInsertStringAfter(Array:which, item, const input[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item in front of the specified item and copies the provided
|
||||||
|
* array into it. All items beyond it get shifted up by one.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input Array to copy to the cellarray
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayInsertArrayBefore(Array:which, item, const any:input[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item in front of the specified item and sets the item's single
|
||||||
|
* cell value. All items beyond it get shifted up by one.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input Value to set
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayInsertCellBefore(Array:which, item, const any:input);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new item in front of the specified item and copies the provided
|
||||||
|
* string into it. All items beyond it get shifted up by one.
|
||||||
|
*
|
||||||
|
* @note The input will be truncated if it is longer than the cellsize the array
|
||||||
|
* was created with.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item index in the array
|
||||||
|
* @param input String to copy to the array
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayInsertStringBefore(Array:which, item, const input[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Swaps the position of two items.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item1,item2 Item pair to swap
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArraySwap(Array:which, item1, item2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes an item from the array. All items beyond it get shifted down by one.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item to delete
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArrayDeleteItem(Array:which, item);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Searches through the array and returns the index of the first occurence of
|
||||||
|
* the specified string.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item String to search for
|
||||||
|
*
|
||||||
|
* @return Array index on success, -1 if the string can't be found
|
||||||
|
* @error Invalid handle.
|
||||||
|
*/
|
||||||
|
native ArrayFindString(Array:which, const item[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Searches through the array and returns the index of the first occurence of
|
||||||
|
* the specified value.
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Value to search for
|
||||||
|
*
|
||||||
|
* @return Array index on success, -1 if the value can't be found
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native ArrayFindValue(Array:which, any:item);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a special handle that can be passed to a string format routine for
|
||||||
|
* printing as a string (with the %a format option).
|
||||||
|
*
|
||||||
|
* @note It is recommended to pass the function as a parameter to the format
|
||||||
|
* routine directly. The array item must contain a null-terminated string!
|
||||||
|
* @note Do not save or otherwise use the handles returned by this function.
|
||||||
|
* @note Example usage:
|
||||||
|
* console_print(id, "%a", ArrayGetStringHandle(MessageArray, i));
|
||||||
|
*
|
||||||
|
* @param which Array handle
|
||||||
|
* @param item Item to retrieve handle of
|
||||||
|
*
|
||||||
|
* @return Handle to the item
|
||||||
|
* @error If an invalid handle or an invalid index is provided an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native DoNotUse:ArrayGetStringHandle(Array:which, item);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys the array and frees its memory.
|
||||||
|
*
|
||||||
|
* @note The function automatically sets the variable passed to it to 0 to aid
|
||||||
|
* in preventing accidental usage after destroy.
|
||||||
|
*
|
||||||
|
* @param which Array to destroy
|
||||||
|
*
|
||||||
|
* @return 1 if the Array was destroyed, 0 if nothing had to be
|
||||||
|
* destroyed (invalid handle)
|
||||||
|
*/
|
||||||
|
native ArrayDestroy(&Array:which);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Similar to sorting.inc's CustomSort, the sorting algorithm then uses the
|
||||||
|
* custom comparison function to sort the data.
|
||||||
|
*
|
||||||
|
* @note The function is called in the following manner:
|
||||||
|
*
|
||||||
|
* public MySortFunc(Array:array, item1, item2, const data[], data_size)
|
||||||
|
*
|
||||||
|
* array - Array handle in its current un-sorted state
|
||||||
|
* item1, item2 - Current item pair being compared
|
||||||
|
* data[] - Extra data array passed to the sort func
|
||||||
|
* data_size - Size of extra data
|
||||||
|
*
|
||||||
|
* @note The comparison function should return:
|
||||||
|
* -1 if item1 should go before item2
|
||||||
|
* 0 if item1 and item2 are equal
|
||||||
|
* 1 if item1 should go after item2
|
||||||
|
*
|
||||||
|
* @note All parameters after item2 are optional and do not need to be specified
|
||||||
|
* and used.
|
||||||
|
* @note Unlike the sorting.inc version, the array passed to the callback is not
|
||||||
|
* in mid-sorted state.
|
||||||
|
*
|
||||||
|
* @param array Array handle
|
||||||
|
* @param comparefunc Callback function used for comparison
|
||||||
|
* @param data Extra data that is passed through to the callback
|
||||||
|
* @param data_size Size of extra data
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid callback is provided
|
||||||
|
* an error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArraySort(Array:array, const comparefunc[], data[]="", data_size=0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A faster version of ArraySort, the sorting algorithm then uses the custom
|
||||||
|
* comparison function to sort the data.
|
||||||
|
*
|
||||||
|
* @note The advantage of this function is that the data of the elements being
|
||||||
|
* compared is directly passed to the function, instead of the item
|
||||||
|
* indexes that are passed by ArraySort. This removes the need for calling
|
||||||
|
* ArrayGet[Cell|String|Array] every time before being able to compare the
|
||||||
|
* elements.
|
||||||
|
*
|
||||||
|
* @note For Arrays with a cellsize of 1 (used for storing integers and floats),
|
||||||
|
* the function is called in the following manner:
|
||||||
|
*
|
||||||
|
* public MySortFunc(Array:array, elem1, elem2, const data[], data_size)
|
||||||
|
*
|
||||||
|
* array - Array handle in its current un-sorted state
|
||||||
|
* elem1, elem2 - Current element pair being compared
|
||||||
|
* data[] - Extra data array passed to the sort func
|
||||||
|
* data_size - Size of extra data
|
||||||
|
*
|
||||||
|
* @note For Arrays with a cellsize larger than 1 (used for storing arrays and
|
||||||
|
* strings), the function is called in the following manner:
|
||||||
|
*
|
||||||
|
* public MySortFunc(Array:array, elem1[], elem2[], const data[], data_size)
|
||||||
|
*
|
||||||
|
* array - Array handle in its current un-sorted state
|
||||||
|
* elem1[], elem2[] - Current element pair being compared
|
||||||
|
* data[] - Extra data array passed to the sort func
|
||||||
|
* data_size - Size of extra data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @note The comparison function should return:
|
||||||
|
* -1 if elem1 should go before elem2
|
||||||
|
* 0 if elem1 and elem2 are equal
|
||||||
|
* 1 if elem1 should go after elem2
|
||||||
|
*
|
||||||
|
* @note All parameters after item2 are optional and do not need to be specified
|
||||||
|
* and used.
|
||||||
|
* @note Unlike the sorting.inc version, the array passed to the callback is not
|
||||||
|
* in mid-sorted state.
|
||||||
|
*
|
||||||
|
* @param array Array handle
|
||||||
|
* @param comparefunc Callback function used for comparison
|
||||||
|
* @param data Extra data that is passed through to the callback
|
||||||
|
* @param data_size Size of extra data
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle or an invalid callback is provided
|
||||||
|
* an error will be thrown.
|
||||||
|
*/
|
||||||
|
native ArraySortEx(Array:array, const comparefunc[], data[]="", data_size=0);
|
166
amxmodx/scripting/include/cellstack.inc
Normal file
166
amxmodx/scripting/include/cellstack.inc
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
#if defined _cellstack_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _cellstack_included
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stack tag declaration
|
||||||
|
*
|
||||||
|
* @note Plugins are responsible for freeing all Stack handles they acquire.
|
||||||
|
* Failing to free handles will result in the plugin and AMXX leaking
|
||||||
|
* memory.
|
||||||
|
*/
|
||||||
|
enum Stack
|
||||||
|
{
|
||||||
|
Invalid_Stack = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a stack structure. A stack is a LIFO (last in, first out) vector of
|
||||||
|
* of items. It has O(1) insertion and O(1) removal.
|
||||||
|
*
|
||||||
|
* @note Stacks provide only two operations: Push (adding an item to the top)
|
||||||
|
* and Pop (remove an item from the top, in reverse-push order).
|
||||||
|
* @note The contents of the stack are uniform; i.e. storing a string and then
|
||||||
|
* retrieving it as an integer is NOT the same as str_to_num()!
|
||||||
|
* @note The "blocksize" determines how many cells each stack slot has, it can
|
||||||
|
* not be changed after creation.
|
||||||
|
*
|
||||||
|
* @param blocksize The number of cells each entry in the stack can hold
|
||||||
|
*
|
||||||
|
* @return New stack Handle, which must be freed via DestroyStack()
|
||||||
|
* @error If an invalid blocksize is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native Stack:CreateStack(blocksize = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes a value onto the end of the stack, adding a new index.
|
||||||
|
*
|
||||||
|
* @note This may safely be used even if the stack has a blocksize greater than
|
||||||
|
* 1.
|
||||||
|
*
|
||||||
|
* @param handle Stack handle
|
||||||
|
* @param value Value to push
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle is provided or the resizing
|
||||||
|
* operation runs out of memory, an error will be thrown.
|
||||||
|
*/
|
||||||
|
native PushStackCell(Stack:handle, any:value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes a string onto the end of a stack, truncating it if it is too long.
|
||||||
|
*
|
||||||
|
* @param handle Stack handle
|
||||||
|
* @param value String to push
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle is provided or the resizing
|
||||||
|
* operation runs out of memory, an error will be thrown.
|
||||||
|
*/
|
||||||
|
native PushStackString(Stack:handle, const value[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes an array of cells onto the end of a stack. The cells are pushed as a
|
||||||
|
* block (i.e. the entire array takes up one stack slot), rather than pushing
|
||||||
|
* each cell individually.
|
||||||
|
*
|
||||||
|
* @param handle Stack handle
|
||||||
|
* @param values Block of values to copy
|
||||||
|
* @param size If not set, the number of elements copied from the array
|
||||||
|
* will be equal to the blocksize, if set higher than the
|
||||||
|
* blocksize, the operation will be truncated,
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid handle is provided or the resizing
|
||||||
|
* operation runs out of memory, an error will be thrown.
|
||||||
|
*/
|
||||||
|
native PushStackArray(Stack:handle, const any:values[], size= -1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pops a cell value from a stack.
|
||||||
|
*
|
||||||
|
* @param handle Stack handle
|
||||||
|
* @param value Variable to store the value in
|
||||||
|
* @param block Optionally specify which block to read from (useful if the
|
||||||
|
* blocksize is > 0)
|
||||||
|
* @param asChar Optionally read as a byte instead of a cell
|
||||||
|
*
|
||||||
|
* @return True on success, false if the stack is empty.
|
||||||
|
* @error If an invalid handle, invalid block or invalid byte is
|
||||||
|
* provided, an error will be thrown.
|
||||||
|
*/
|
||||||
|
native bool:PopStackCell(Stack:handle, &any:value, block = 0, bool:asChar = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pops a string value from a stack.
|
||||||
|
*
|
||||||
|
* @param handle Stack handle
|
||||||
|
* @param buffer Buffer to copy string to
|
||||||
|
* @param maxlength Maximum size of the buffer
|
||||||
|
* @param written Variable to store number of characters copied to
|
||||||
|
*
|
||||||
|
* @return True on success, false if the stack is empty
|
||||||
|
* @error If an invalid handle is provided an error will be thrown.
|
||||||
|
*/
|
||||||
|
native bool:PopStackString(Stack:handle, buffer[], maxlength, &written = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pops an array of cells from a stack.
|
||||||
|
*
|
||||||
|
* @param handle Stack handle
|
||||||
|
* @param buffer Array to copy value to
|
||||||
|
* @param size Size of buffer, if not set (-1) assumes the size is equal to
|
||||||
|
* the stack blocksize
|
||||||
|
*
|
||||||
|
* @return True on success, false if the stack is empty
|
||||||
|
* @error If an invalid handle is provided an error will be thrown.
|
||||||
|
*/
|
||||||
|
native bool:PopStackArray(Stack:handle, any:buffer[], size = -1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if a stack is empty.
|
||||||
|
*
|
||||||
|
* @param handle Stack handle
|
||||||
|
*
|
||||||
|
* @return True if empty, false if not empty
|
||||||
|
* @error If an invalid handle is provided an error will be thrown.
|
||||||
|
*/
|
||||||
|
native bool:IsStackEmpty(Stack:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pops a value off a stack, ignoring it completely.
|
||||||
|
*
|
||||||
|
* @param handle Stack handle
|
||||||
|
*
|
||||||
|
* @return True if a value was popped, false if stack is empty
|
||||||
|
* @error If an invalid handle is provided an error will be thrown.
|
||||||
|
*/
|
||||||
|
stock PopStack(Stack:handle)
|
||||||
|
{
|
||||||
|
new value;
|
||||||
|
return PopStackCell(handle, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys a stack and frees its memory.
|
||||||
|
*
|
||||||
|
* @note The function automatically sets the variable passed to it to 0 to aid
|
||||||
|
* in preventing accidental usage after destroy.
|
||||||
|
*
|
||||||
|
* @param handle Stack to destroy
|
||||||
|
*
|
||||||
|
* @return 1 if the Stack was destroyed, 0 if nothing had to be
|
||||||
|
* destroyed (invalid handle)
|
||||||
|
*/
|
||||||
|
native DestroyStack(&Stack:handle);
|
412
amxmodx/scripting/include/celltrie.inc
Normal file
412
amxmodx/scripting/include/celltrie.inc
Normal file
|
@ -0,0 +1,412 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
#if defined _celltrie_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _celltrie_included
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hash map tag declaration
|
||||||
|
*
|
||||||
|
* @note The word "Trie" in this API is historical. As of AMX Mod X 1.8.3,
|
||||||
|
* tries have been internally replaced with hash tables, which have O(1)
|
||||||
|
* insertion time instead of O(n).
|
||||||
|
* @note Plugins are responsible for freeing all Trie handles they acquire.
|
||||||
|
* Failing to free handles will result in the plugin and AMXX leaking
|
||||||
|
* memory.
|
||||||
|
*/
|
||||||
|
enum Trie
|
||||||
|
{
|
||||||
|
Invalid_Trie = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hash map iterator tag declaration
|
||||||
|
*
|
||||||
|
* @note The word "Trie" in this API is historical. As of AMX Mod X 1.8.3,
|
||||||
|
* tries have been internally replaced with hash tables, which have O(1)
|
||||||
|
* insertion time instead of O(n).
|
||||||
|
* @note Plugins are responsible for freeing all TrieIter handles they acquire.
|
||||||
|
* Failing to free handles will result in the plugin and AMXX leaking
|
||||||
|
* memory.
|
||||||
|
*/
|
||||||
|
enum TrieIter
|
||||||
|
{
|
||||||
|
Invalid_TrieIter = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hash map snapshot tag declaration
|
||||||
|
*
|
||||||
|
* @note Plugins are responsible for freeing all Snapshot handles they acquire.
|
||||||
|
* Failing to free handles will result in the plugin and AMXX leaking
|
||||||
|
* memory.
|
||||||
|
*/
|
||||||
|
enum Snapshot
|
||||||
|
{
|
||||||
|
Invalid_Snapshot = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a hash map. A hash map is a container that maps strings (called keys)
|
||||||
|
* to arbitrary values (cells, arrays or strings).
|
||||||
|
*
|
||||||
|
* @note Keys in a hash map are unique so there is no more than one entry in the
|
||||||
|
* map for any given key.
|
||||||
|
* @note Insertion, deletion, and lookup in a hash map are all considered to be
|
||||||
|
* fast operations, amortized to O(1), or constant time.
|
||||||
|
*
|
||||||
|
* @return New Map handle, which must be freed via TrieDestroy()
|
||||||
|
*/
|
||||||
|
native Trie:TrieCreate();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears all entries from a Map.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
*
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
native TrieClear(Trie:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a cell value in a hash map, either inserting a new entry or replacing
|
||||||
|
* an old one.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
* @param key Key string
|
||||||
|
* @param value Value to store
|
||||||
|
* @param replace If false the operation will fail if the key is already set
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 otherwise
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native TrieSetCell(Trie:handle, const key[], any:value, bool:replace = true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a string value in a hash map, either inserting a new entry or replacing
|
||||||
|
* an old one.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
* @param key Key string
|
||||||
|
* @param value String to store
|
||||||
|
* @param replace If false the operation will fail if the key is already set
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 otherwise
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native TrieSetString(Trie:handle, const key[], const value[], bool:replace = true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets an array value in a hash map, either inserting a new entry or replacing
|
||||||
|
* an old one.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
* @param key Key string
|
||||||
|
* @param buffer Array to store
|
||||||
|
* @param size Array size
|
||||||
|
* @param replace If false the operation will fail if the key is already set
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 otherwise
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown. or invalid array size
|
||||||
|
*/
|
||||||
|
native TrieSetArray(Trie:handle, const key[], const any:buffer[], size, bool:replace = true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a cell value from a hash map.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
* @param key Key string
|
||||||
|
* @param value Variable to store value to
|
||||||
|
*
|
||||||
|
* @return True on success, false if either the key is not set or the
|
||||||
|
* value type does not match (value is string or array)
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native bool:TrieGetCell(Trie:handle, const key[], &any:value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a string from a hash map.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
* @param key Key string
|
||||||
|
* @param output Buffer to copy the value to
|
||||||
|
* @param outputsize Maximum size of buffer
|
||||||
|
* @param size Optional variable to store the number of cells written
|
||||||
|
* to the buffer in
|
||||||
|
*
|
||||||
|
* @return True on success, false if either the key is not set or
|
||||||
|
* the value type does not match (value is cell or array)
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native bool:TrieGetString(Trie:handle, const key[], output[], outputsize, &size = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a string from a hash map.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
* @param key Key string
|
||||||
|
* @param output Array to copy the value to
|
||||||
|
* @param outputsize Maximum size of array
|
||||||
|
* @param size Optional variable to store the number of cells written
|
||||||
|
* to the array in
|
||||||
|
*
|
||||||
|
* @return True on success, false if either the key is not set or
|
||||||
|
* the value type does not match (value is cell or string)
|
||||||
|
* @error If an invalid handle or array size is provided an error
|
||||||
|
* will be thrown.
|
||||||
|
*/
|
||||||
|
native bool:TrieGetArray(Trie:handle, const key[], any:output[], outputsize, &size = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes an entry from a hash map.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
* @param key Key string
|
||||||
|
*
|
||||||
|
* @return True on success, false if the key was never set
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native bool:TrieDeleteKey(Trie:handle, const key[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks a hash map for the existence of an entry.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
* @param key Key string
|
||||||
|
*
|
||||||
|
* @return True if the key is set, false otherwise
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native bool:TrieKeyExists(Trie:handle, const key[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys a hash map and frees its memory.
|
||||||
|
*
|
||||||
|
* @note The function automatically sets the variable passed to it to 0 to aid
|
||||||
|
* in preventing accidental usage after destroy.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 if an invalid handle was passed in
|
||||||
|
*/
|
||||||
|
native TrieDestroy(&Trie:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of entries in a hash map.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
*
|
||||||
|
* @return Number of elements in the hash map
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native TrieGetSize(Trie:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a snapshot of all keys in a hash map. If the map is changed
|
||||||
|
* afterwards, the changes are not reflected in the snapshot.
|
||||||
|
* Keys are not sorted.
|
||||||
|
*
|
||||||
|
* @param handle Map handle
|
||||||
|
*
|
||||||
|
* @return New map snapshot handle, which must be freed via
|
||||||
|
* TrieSnapshotDestroy()
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native Snapshot:TrieSnapshotCreate(Trie:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of keys in a map snapshot. Note that this may be
|
||||||
|
* different from the size of the map, since the map can change after the
|
||||||
|
* snapshot of its keys was taken.
|
||||||
|
*
|
||||||
|
* @param handle Map snapshot handle
|
||||||
|
*
|
||||||
|
* @return Number of keys
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native TrieSnapshotLength(Snapshot:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the buffer size required to store a given key. That is, it returns
|
||||||
|
* the length of the key plus one.
|
||||||
|
*
|
||||||
|
* @param handle Map snapshot handle
|
||||||
|
* @param index Key index (starting from 0)
|
||||||
|
*
|
||||||
|
* @return Buffer size required to store the key string
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown. or index out of range
|
||||||
|
*/
|
||||||
|
native TrieSnapshotKeyBufferSize(Snapshot:handle, index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the key string of a given key in a map snapshot.
|
||||||
|
*
|
||||||
|
* @param handle Map snapshot handle
|
||||||
|
* @param index Key index (starting from 0)
|
||||||
|
* @param buffer String buffer
|
||||||
|
* @param maxlength Maximum buffer length
|
||||||
|
*
|
||||||
|
* @return Number of bytes written to the buffer
|
||||||
|
* @error If an invalid handle is provided an error will be
|
||||||
|
* thrown. or index out of range
|
||||||
|
*/
|
||||||
|
native TrieSnapshotGetKey(Snapshot:handle, index, buffer[], maxlength);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys a map snapshot and frees its memory.
|
||||||
|
*
|
||||||
|
* @note The function automatically sets the variable passed to it to 0 to aid
|
||||||
|
* in preventing accidental usage after destroy.
|
||||||
|
*
|
||||||
|
* @param handle Map snapshot handle
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 if an invalid handle was passed in
|
||||||
|
*/
|
||||||
|
native TrieSnapshotDestroy(&Snapshot:handle);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an iterator for a map. It provides iterative read-only access to the
|
||||||
|
* maps contents.
|
||||||
|
*
|
||||||
|
* @note Removing or adding keys to the underlying map will invalidate all its
|
||||||
|
* iterators. Updating values of existing keys is allowed and the changes
|
||||||
|
* will be immediately reflected in the iterator.
|
||||||
|
* @note Iterators are designed to be short-lived and not stored, and creating
|
||||||
|
* them is very cheap. Reading data from an iterator is just as fast as
|
||||||
|
* reading directly from the map.
|
||||||
|
* @note Just like in snapshots the keys are not sorted.
|
||||||
|
*
|
||||||
|
* @return New iterator handle, which must be freed via TrieIterDestroy().
|
||||||
|
* @error Invalid Handle
|
||||||
|
*/
|
||||||
|
native TrieIter:TrieIterCreate(Trie:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the iterator has reached its end and no more data can be read.
|
||||||
|
*
|
||||||
|
* @param handle Iterator handle
|
||||||
|
*
|
||||||
|
* @return True if iterator has reached the end, false otherwise
|
||||||
|
* @error Invalid Handle
|
||||||
|
* Iterator has been closed (underlying map destroyed)
|
||||||
|
* Iterator is outdated
|
||||||
|
*/
|
||||||
|
native bool:TrieIterEnded(TrieIter:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Advances the iterator to the next key/value pair if one is available.
|
||||||
|
*
|
||||||
|
* @param handle Iterator handle
|
||||||
|
*
|
||||||
|
* @error Invalid Handle
|
||||||
|
* Iterator has been closed (underlying map destroyed)
|
||||||
|
* Iterator is outdated
|
||||||
|
*/
|
||||||
|
native TrieIterNext(TrieIter:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the key the iterator currently points to.
|
||||||
|
*
|
||||||
|
* @param handle Iterator handle.
|
||||||
|
* @param key Buffer to store the current key in.
|
||||||
|
* @param outputsize Maximum size of string buffer.
|
||||||
|
*
|
||||||
|
* @return Nnumber of bytes written to the buffer
|
||||||
|
* @error Invalid handle
|
||||||
|
* Iterator has been closed (underlying map destroyed)
|
||||||
|
* Iterator is outdated
|
||||||
|
*/
|
||||||
|
native TrieIterGetKey(TrieIter:handle, key[], outputsize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the number of elements in the underlying map.
|
||||||
|
*
|
||||||
|
* @note When used on a valid iterator this is exactly the same as calling TrieGetSize on the map directly.
|
||||||
|
*
|
||||||
|
* @param handle Iterator handle
|
||||||
|
*
|
||||||
|
* @return Number of elements in the map
|
||||||
|
* @error Invalid handle
|
||||||
|
* Iterator has been closed (underlying map destroyed)
|
||||||
|
* Iterator is outdated
|
||||||
|
*/
|
||||||
|
native TrieIterGetSize(TrieIter:handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a value at the current position of the iterator.
|
||||||
|
*
|
||||||
|
* @param handle Iterator handle
|
||||||
|
* @param value Variable to store value in
|
||||||
|
*
|
||||||
|
* @return True on success, false if the iterator is empty or the current
|
||||||
|
* value is an array or a string.
|
||||||
|
* @error Invalid handle
|
||||||
|
* Iterator has been closed (underlying map destroyed)
|
||||||
|
* Iterator is outdated
|
||||||
|
*/
|
||||||
|
native bool:TrieIterGetCell(TrieIter:handle, &any:value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a string at the current position of the iterator.
|
||||||
|
*
|
||||||
|
* @param handle Iterator handle
|
||||||
|
* @param buffer Buffer to store the string in
|
||||||
|
* @param outputsize Maximum size of string buffer
|
||||||
|
* @param size Optional parameter to store the number of bytes written to the buffer.
|
||||||
|
*
|
||||||
|
* @return True on success, false if the iterator is empty or the current value
|
||||||
|
* is not a string.
|
||||||
|
* @error Invalid handle
|
||||||
|
* Invalid buffer size
|
||||||
|
* Iterator has been closed (underlying map destroyed)
|
||||||
|
* Iterator is outdated
|
||||||
|
*/
|
||||||
|
native bool:TrieIterGetString(TrieIter:handle, buffer[], outputsize, &size = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves an array at the current position of the iterator.
|
||||||
|
*
|
||||||
|
* @param handle Iterator handle
|
||||||
|
* @param buffer Buffer to store the array
|
||||||
|
* @param outputsize Maximum size of buffer
|
||||||
|
* @param size Optional parameter to store the number of bytes written to the buffer
|
||||||
|
*
|
||||||
|
* @return True on success, false if the iterator is empty or the current
|
||||||
|
* value is not an array.
|
||||||
|
* @error Invalid handle
|
||||||
|
* Invalid buffer size
|
||||||
|
* Iterator has been closed (underlying map destroyed)
|
||||||
|
* Iterator is outdated
|
||||||
|
*/
|
||||||
|
native bool:TrieIterGetArray(TrieIter:handle, any:array[], outputsize, &size = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys an iterator handle.
|
||||||
|
*
|
||||||
|
* @param handle Iterator handle.
|
||||||
|
*
|
||||||
|
* @return True on success, false if the value was never set.
|
||||||
|
*/
|
||||||
|
native TrieIterDestroy(&TrieIter:handle);
|
142
amxmodx/scripting/include/colorchat.inc
Normal file
142
amxmodx/scripting/include/colorchat.inc
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
/* Fun functions
|
||||||
|
*
|
||||||
|
* by Numb
|
||||||
|
*
|
||||||
|
* This file is provided as is (no warranties).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined _colorchat_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _colorchat_included
|
||||||
|
|
||||||
|
enum Color
|
||||||
|
{
|
||||||
|
NORMAL = 1, // clients scr_concolor cvar color
|
||||||
|
GREEN, // Green Color
|
||||||
|
TEAM_COLOR, // Red, grey, blue
|
||||||
|
GREY, // grey
|
||||||
|
RED, // Red
|
||||||
|
BLUE, // Blue
|
||||||
|
}
|
||||||
|
|
||||||
|
new TeamName[][] =
|
||||||
|
{
|
||||||
|
"",
|
||||||
|
"TERRORIST",
|
||||||
|
"CT",
|
||||||
|
"SPECTATOR"
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
|
||||||
|
{
|
||||||
|
new message[256];
|
||||||
|
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
case NORMAL: // clients scr_concolor cvar color
|
||||||
|
{
|
||||||
|
message[0] = 0x01;
|
||||||
|
}
|
||||||
|
case GREEN: // Green
|
||||||
|
{
|
||||||
|
message[0] = 0x04;
|
||||||
|
}
|
||||||
|
default: // White, Red, Blue
|
||||||
|
{
|
||||||
|
message[0] = 0x03;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vformat(message[1], 251, msg, 4);
|
||||||
|
|
||||||
|
// Make sure message is not longer than 192 character. Will crash the server.
|
||||||
|
message[192] = '^0';
|
||||||
|
|
||||||
|
new team, ColorChange, index, MSG_Type;
|
||||||
|
|
||||||
|
if(id)
|
||||||
|
{
|
||||||
|
MSG_Type = MSG_ONE;
|
||||||
|
index = id;
|
||||||
|
} else {
|
||||||
|
index = FindPlayer();
|
||||||
|
MSG_Type = MSG_ALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
team = get_user_team(index);
|
||||||
|
ColorChange = ColorSelection(index, MSG_Type, type);
|
||||||
|
|
||||||
|
ShowColorMessage(index, MSG_Type, message);
|
||||||
|
|
||||||
|
if(ColorChange)
|
||||||
|
{
|
||||||
|
Team_Info(index, MSG_Type, TeamName[team]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ShowColorMessage(id, type, message[])
|
||||||
|
{
|
||||||
|
static bool:saytext_used;
|
||||||
|
static get_user_msgid_saytext;
|
||||||
|
if(!saytext_used)
|
||||||
|
{
|
||||||
|
get_user_msgid_saytext = get_user_msgid("SayText");
|
||||||
|
saytext_used = true;
|
||||||
|
}
|
||||||
|
message_begin(type, get_user_msgid_saytext, _, id);
|
||||||
|
write_byte(id)
|
||||||
|
write_string(message);
|
||||||
|
message_end();
|
||||||
|
}
|
||||||
|
|
||||||
|
Team_Info(id, type, team[])
|
||||||
|
{
|
||||||
|
static bool:teaminfo_used;
|
||||||
|
static get_user_msgid_teaminfo;
|
||||||
|
if(!teaminfo_used)
|
||||||
|
{
|
||||||
|
get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
|
||||||
|
teaminfo_used = true;
|
||||||
|
}
|
||||||
|
message_begin(type, get_user_msgid_teaminfo, _, id);
|
||||||
|
write_byte(id);
|
||||||
|
write_string(team);
|
||||||
|
message_end();
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorSelection(index, type, Color:Type)
|
||||||
|
{
|
||||||
|
switch(Type)
|
||||||
|
{
|
||||||
|
case RED:
|
||||||
|
{
|
||||||
|
return Team_Info(index, type, TeamName[1]);
|
||||||
|
}
|
||||||
|
case BLUE:
|
||||||
|
{
|
||||||
|
return Team_Info(index, type, TeamName[2]);
|
||||||
|
}
|
||||||
|
case GREY:
|
||||||
|
{
|
||||||
|
return Team_Info(index, type, TeamName[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
FindPlayer()
|
||||||
|
{
|
||||||
|
new i = -1;
|
||||||
|
|
||||||
|
while(i <= get_maxplayers())
|
||||||
|
{
|
||||||
|
if(is_user_connected(++i))
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
202
amxmodx/scripting/include/core.inc
Normal file
202
amxmodx/scripting/include/core.inc
Normal file
|
@ -0,0 +1,202 @@
|
||||||
|
/* Core functions
|
||||||
|
*
|
||||||
|
* (c) Copyright 1998-2003, ITB CompuPhase
|
||||||
|
*
|
||||||
|
* This file is provided as is (no warranties).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined _core_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _core_included
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the free memory space available to the plugin.
|
||||||
|
*
|
||||||
|
* @note This is a debugging function that is not intended for general plugin
|
||||||
|
* use.
|
||||||
|
*
|
||||||
|
* @return Free memory space in bytes
|
||||||
|
*/
|
||||||
|
native heapspace();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the function index of a public function declared in the plugin.
|
||||||
|
*
|
||||||
|
* @param name Function name
|
||||||
|
*
|
||||||
|
* @return Function index > 0 on success, -1 if function was not found
|
||||||
|
* @error If the function name is too long (longer than 63 characters)
|
||||||
|
* an error will be thrown.
|
||||||
|
*/
|
||||||
|
native funcidx(const name[]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of arguments passed into the currently executed function.
|
||||||
|
*
|
||||||
|
* @return Number of arguments passed
|
||||||
|
*/
|
||||||
|
native numargs();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves an argument value passed into the currently executed function.
|
||||||
|
*
|
||||||
|
* @param arg Argument index
|
||||||
|
* @param index Index to retrieve from the argument (for arrays and strings)
|
||||||
|
*
|
||||||
|
* @return Argument value at given index
|
||||||
|
*/
|
||||||
|
native getarg(arg, index = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of an argument passed into the currently executed function.
|
||||||
|
*
|
||||||
|
* @note This is not equal to assigning a new value to a by-reference argument.
|
||||||
|
*
|
||||||
|
* @param arg Argument index
|
||||||
|
* @param index Index to set in the argument (for arrays and strings)
|
||||||
|
*/
|
||||||
|
native setarg(arg, index = 0, value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a character to lowercase.
|
||||||
|
*
|
||||||
|
* @note This is not UTF8 or locale-safe.
|
||||||
|
*
|
||||||
|
* @param c Character to convert
|
||||||
|
*
|
||||||
|
* @return Converted character
|
||||||
|
*/
|
||||||
|
native tolower(c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a character to uppercase.
|
||||||
|
*
|
||||||
|
* @note This is not UTF8 or locale-safe.
|
||||||
|
*
|
||||||
|
* @param c Character to convert
|
||||||
|
*
|
||||||
|
* @return Converted character
|
||||||
|
*/
|
||||||
|
native toupper(c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Swaps the bytes of a value (the lowest byte becomes the highest byte).
|
||||||
|
*
|
||||||
|
* @param c Value to swap
|
||||||
|
*
|
||||||
|
* @return Byte-swapped value
|
||||||
|
*/
|
||||||
|
native swapchars(c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a random number between 0 and a specified upper bound.
|
||||||
|
*
|
||||||
|
* @param max Exclusive upper bound
|
||||||
|
*
|
||||||
|
* @return Random value
|
||||||
|
*/
|
||||||
|
native random(max);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the smaller of two provided values.
|
||||||
|
*
|
||||||
|
* @param value1 Value one
|
||||||
|
* @param value2 Value two
|
||||||
|
*
|
||||||
|
* @return Smaller of the two values
|
||||||
|
*/
|
||||||
|
native min(value1, value2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the bigger of two provided values.
|
||||||
|
*
|
||||||
|
* @param value1 Value one
|
||||||
|
* @param value2 Value two
|
||||||
|
*
|
||||||
|
* @return Bigger of the two values
|
||||||
|
*/
|
||||||
|
native max(value1, value2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Limits a provided value between two specified bounds.
|
||||||
|
*
|
||||||
|
* @param value Value to clamp
|
||||||
|
* @param min Lower bound
|
||||||
|
* @param max Upper bound
|
||||||
|
*
|
||||||
|
* @return The value if it is between the lower and upper bound, min if
|
||||||
|
* value is below, max if it is above the specified bounds.
|
||||||
|
*/
|
||||||
|
native clamp(value, min = cellmin, max = cellmax);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a value raised to a specified exponent.
|
||||||
|
*
|
||||||
|
* @param value Value
|
||||||
|
* @param exponent Exponent to raise value to
|
||||||
|
*
|
||||||
|
* @return Value to the power of exponent
|
||||||
|
*/
|
||||||
|
native power(value, exponent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the approximated square root of a value.
|
||||||
|
*
|
||||||
|
* @note This uses a simple successice approximation algorithm (continuously
|
||||||
|
* dividing the value) and only deals with integers, this makes it very
|
||||||
|
* imprecise.
|
||||||
|
*
|
||||||
|
* @param value Value
|
||||||
|
*
|
||||||
|
* @return Square root of the value
|
||||||
|
*/
|
||||||
|
native sqroot(value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the current time in hours, minutes and seconds.
|
||||||
|
*
|
||||||
|
* @param hour Variable to store hours in
|
||||||
|
* @param minute Variable to store minutes in
|
||||||
|
* @param second Variable to store seconds in
|
||||||
|
*
|
||||||
|
* @return Unix timestamp
|
||||||
|
*/
|
||||||
|
native time(&hour = 0, &minute = 0, &second = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the current date in year, month and day.
|
||||||
|
*
|
||||||
|
* @param year Variable to store year in
|
||||||
|
* @param month Variable to store month in
|
||||||
|
* @param day Variable to store day in
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*/
|
||||||
|
native date(&year = 0, &month = 0, &day = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the elapsed CPU seconds.
|
||||||
|
*
|
||||||
|
* @note This is a debugging function that is not intended for general plugin
|
||||||
|
* use.
|
||||||
|
* @note This uses the C clock() function internally and comes with all its
|
||||||
|
* drawbacks attached.
|
||||||
|
*
|
||||||
|
* @param granularity Unused
|
||||||
|
*
|
||||||
|
* @return Number of CPU seconds elapsed
|
||||||
|
*/
|
||||||
|
native tickcount(&granularity = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the absolute value of a number.
|
||||||
|
*
|
||||||
|
* @param x Integral value
|
||||||
|
*
|
||||||
|
* @return Absolute value of x (x if it is greater than 0, -x otherwise)
|
||||||
|
*/
|
||||||
|
stock abs(x)
|
||||||
|
{
|
||||||
|
return x > 0 ? x : -x;
|
||||||
|
}
|
298
amxmodx/scripting/include/csstats.inc
Normal file
298
amxmodx/scripting/include/csstats.inc
Normal file
|
@ -0,0 +1,298 @@
|
||||||
|
// vim: set ts=4 sw=4 tw=99 noet:
|
||||||
|
//
|
||||||
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
||||||
|
// Copyright (C) The AMX Mod X Development Team.
|
||||||
|
//
|
||||||
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
||||||
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
||||||
|
// https://alliedmods.net/amxmodx-license
|
||||||
|
|
||||||
|
#if defined _csstats_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _csstats_included
|
||||||
|
|
||||||
|
#include <csstats_const>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the client's current weapon statistics.
|
||||||
|
*
|
||||||
|
* @note For a list of default CS weapon ids see the CSW_* constants in
|
||||||
|
* amxconst.inc, this function also works on custom weapons.
|
||||||
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - Kills
|
||||||
|
* 1 - Deaths
|
||||||
|
* 2 - Headshots
|
||||||
|
* 3 - Teamkills
|
||||||
|
* 4 - Shots
|
||||||
|
* 5 - Hits
|
||||||
|
* 6 - Damage
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param wpnindex Weapon id, or 0 to retrieve total statistics across all
|
||||||
|
* weapons
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
* @param bodyhits Buffer to copy body hits to
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 if no statistics are available for the weapon
|
||||||
|
* id
|
||||||
|
* @error If an invalid client index or weapon id is provided, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native get_user_wstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the client's weapon statistics from the current round.
|
||||||
|
*
|
||||||
|
* @note For a list of default CS weapon ids see the CSW_* constants in
|
||||||
|
* amxconst.inc, this function also works on custom weapons.
|
||||||
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - Kills
|
||||||
|
* 1 - Deaths
|
||||||
|
* 2 - Headshots
|
||||||
|
* 3 - Teamkills
|
||||||
|
* 4 - Shots
|
||||||
|
* 5 - Hits
|
||||||
|
* 6 - Damage
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param wpnindex Weapon id, or 0 to retrieve total statistics across all
|
||||||
|
* weapons
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
* @param bodyhits Buffer to copy body hits to
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 if no statistics are available for the
|
||||||
|
* weapon id
|
||||||
|
* @error If an invalid client index or weapon id is provided, an
|
||||||
|
* error will be thrown.
|
||||||
|
*/
|
||||||
|
native get_user_wrstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the client's weapon statistics from the permanent storage on the
|
||||||
|
* server.
|
||||||
|
*
|
||||||
|
* @note The permanent storage is updated on every respawn or client disconnect.
|
||||||
|
* @note Player rank is determined by the customizable "get_score" function in
|
||||||
|
* "data/csstats.amxx". By default it uses the difference of kills to
|
||||||
|
* deaths/teamkills.
|
||||||
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - Kills
|
||||||
|
* 1 - Deaths
|
||||||
|
* 2 - Headshots
|
||||||
|
* 3 - Teamkills
|
||||||
|
* 4 - Shots
|
||||||
|
* 5 - Hits
|
||||||
|
* 6 - Damage
|
||||||
|
* 7 - Rank
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
* @param bodyhits Buffer to copy body hits to
|
||||||
|
*
|
||||||
|
* @return Players rank > 0 on success, or 0 if player is not ranked
|
||||||
|
* and no statistics are available
|
||||||
|
* @error If an invalid client index is provided, an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native get_user_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the client's statistics from the current round.
|
||||||
|
*
|
||||||
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - Kills
|
||||||
|
* 1 - Deaths
|
||||||
|
* 2 - Headshots
|
||||||
|
* 3 - Teamkills
|
||||||
|
* 4 - Shots
|
||||||
|
* 5 - Hits
|
||||||
|
* 6 - Damage
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
* @param bodyhits Buffer to copy body hits to
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 if no statistics are available
|
||||||
|
* @error If an invalid client index is provided, an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native get_user_rstats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the client's statistics inflicted upon another client from the
|
||||||
|
* current round.
|
||||||
|
*
|
||||||
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - Kills
|
||||||
|
* 1 - Deaths
|
||||||
|
* 2 - Headshots
|
||||||
|
* 3 - Teamkills
|
||||||
|
* 4 - Shots
|
||||||
|
* 5 - Hits
|
||||||
|
* 6 - Damage
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param victim Victim client index, or 0 to retrieve the statistics against
|
||||||
|
* all victims
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
* @param bodyhits Buffer to copy body hits to
|
||||||
|
* @param wpnname Optional buffer to copy last used weapon name to
|
||||||
|
* @param len Maximum buffer size
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 if no statistics are available against the
|
||||||
|
* specified victim
|
||||||
|
* @error If an invalid client index is provided, an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native get_user_vstats(index, victim, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the client's statistics received from another client from the
|
||||||
|
* current round.
|
||||||
|
*
|
||||||
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - Kills
|
||||||
|
* 1 - Deaths
|
||||||
|
* 2 - Headshots
|
||||||
|
* 3 - Teamkills
|
||||||
|
* 4 - Shots
|
||||||
|
* 5 - Hits
|
||||||
|
* 6 - Damage
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param wpnindex Attacker client index, or 0 to retrieve the statistics from
|
||||||
|
* all attackers
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
* @param bodyhits Buffer to copy body hits to
|
||||||
|
* @param wpnname Optional buffer to copy last used weapon name to
|
||||||
|
* @param len Maximum buffer size
|
||||||
|
*
|
||||||
|
* @return 1 on success, 0 if no statistics are available against the
|
||||||
|
* specified attacker
|
||||||
|
* @error If an invalid client index is provided, an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native get_user_astats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the current round weapon, attacker and victim statistics.
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
* @error If an invalid client index is provided, an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native reset_user_wstats(index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves statistics from the permanent storage on the server via iterative,
|
||||||
|
* incremental access.
|
||||||
|
*
|
||||||
|
* @note The permanent storage is updated on every respawn or client disconnect.
|
||||||
|
* @note Player rank is determined by the customizable "get_score" function in
|
||||||
|
* "data/csstats.amxx". By default it uses the difference of kills to
|
||||||
|
* deaths/teamkills.
|
||||||
|
* @note For a list of possible body hitplaces see the HIT_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - Kills
|
||||||
|
* 1 - Deaths
|
||||||
|
* 2 - Headshots
|
||||||
|
* 3 - Teamkills
|
||||||
|
* 4 - Shots
|
||||||
|
* 5 - Hits
|
||||||
|
* 6 - Damage
|
||||||
|
* 7 - Rank
|
||||||
|
*
|
||||||
|
* @param index Rank index
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
* @param bodyhits Buffer to copy body hits to
|
||||||
|
* @param name Buffer to copy client name to
|
||||||
|
* @param len Maximum name buffer size
|
||||||
|
* @param authid Buffer to copy client auth id to
|
||||||
|
* @param authidlen Maximum authid buffer size
|
||||||
|
*
|
||||||
|
* @return Next rank index (> 0 and > index), or 0 if no more
|
||||||
|
* statistics exist
|
||||||
|
*/
|
||||||
|
native get_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], name[], len, authid[] = "", authidlen = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of all entries in the permanent statistics storage.
|
||||||
|
*
|
||||||
|
* @return Number of entries in statistics storage
|
||||||
|
*/
|
||||||
|
native get_statsnum();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the client's objective statistics from the permanent storage.
|
||||||
|
*
|
||||||
|
* @note The permanent storage is updated on every respawn or client disconnect.
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - total defusions
|
||||||
|
* 1 - bomb defused
|
||||||
|
* 2 - bomb plants
|
||||||
|
* 3 - bomb explosions
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
*
|
||||||
|
* @return Players rank > 0 on success, or 0 if player is not ranked
|
||||||
|
* and no statistics are available
|
||||||
|
* @error If an invalid client index is provided, an error will be
|
||||||
|
* thrown.
|
||||||
|
*/
|
||||||
|
native get_user_stats2(index, stats[STATSX_MAX_OBJECTIVE]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves objective statistics from the permanent storage on the server via
|
||||||
|
* iterative, incremental access.
|
||||||
|
*
|
||||||
|
* @note The permanent storage is updated on every respawn or client disconnect.
|
||||||
|
* @note For a list of possible stat constants see the STATSX_* constants in
|
||||||
|
* amxconst.inc
|
||||||
|
* @note The fields in the statistics are:
|
||||||
|
* 0 - total defusions
|
||||||
|
* 1 - bomb defused
|
||||||
|
* 2 - bomb plants
|
||||||
|
* 3 - bomb explosions
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
* @param stats Buffer to copy statistics to
|
||||||
|
* @param authid Buffer to copy client auth id to
|
||||||
|
* @param authidlen Maximum authid buffer size
|
||||||
|
*
|
||||||
|
* @return Next rank index (> 0 and > index), or 0 if no more
|
||||||
|
* statistics exist
|
||||||
|
*/
|
||||||
|
native get_stats2(index, stats[STATSX_MAX_OBJECTIVE], authid[] = "", authidlen = 0);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user