* Lack register_event() on event_enable/disable
Lack register_event() on enable_event and disable_event descriptions
* It shoud be m_iJoiningState not m_iJointState
It shoud be m_iJoiningState not m_iJointState
* Menu buttons stayed english in Plugin's cvar/command menus
That worked, but if there is any better solution to get it working feel free to edit :D
* Changed language parsing to %L
Just a small fix on json_parse return description. I'm sure it was supposed to be `Invalid_JSON` instead of `Invalid_JSONValue`.
Thank you, guys, that's one of my favorites features.
* Replace atoi by strtol in the config parser
* Move hamdata.ini data to gamedata files
* Reference the new files in master file
* Remove all the parsing code and use config manager to get the offsets
* Remove any hamdata.ini references
* Clean up menu_create() internal code
No code changes. Just modernizing code a little and tidying up things.
* Implement menu_create() "ml" param
* Include newmenu.inc to VS project files
* Adjust documentation
* Put back the quote in the log error message.
* Additions to hlsdk_const
Added values to hlsdk_const using regamedll_cs and reapi as reference.
* Update cstrike_const.inc
* Prefix constants with CS_ to avoid name collision and for consistency
* Fun: Replace ENTINDEX with TypeConversion for consistency
* Fun: Add a class wrapping player's data
* Fun: Make TraceLine a post forward
Reason: as it is it breaks plugins hooking TraceLine because of the original game call is being superceded and other modules can't catch it. It looks like it's this way from the very start fun module has been introduced 13 years ago before. Fakemeta module comes a little later.
* Fun: Clean up code
* Fun: Toggle PlayerPreThink forward on demand
* Fun: Toggle TraceLine forward on demand
* Fun: Add HITZONE* constants for use with set/get_user_hitzone()
* Fun: Refactor a litte the player class
* Fun: Clean up a little more
* Fun: Fix typo in set_user_hitzones from previous commit
* Allow get_players to get the players num only
* used empty brackets instead of zero
* Add get_playersnum_ex stock to amxmisc.inc
* Added missing empty brackets
* Remove brackets from get_players
* Fixed a typo in function description
* Change letters to flags in get_playersnum_ex description
* Add constants for stats functions
* Changed STATS_ to STATSX_ and added 2 more defines
* Added constants for all games
* Add csstats_const.inc and add _MAX_ constats to enum
* Change bodyhits
* Improve messages.inc and message_stocks.inc documentation
* Fix typos
* Fixed typos, added a bunch of @notes and better register_message callback function explanation
* Removed extra argument in set_msg_arg_string
* Creates => Sends
* Hungarian language update
The important parts have been updated* and the missing parts added according to my best knowledge.
*admincmd.txr was UTF8 instead of UTF8 without BOM, I'm not sure it was a mistake or not.
* Further Hungarian translation update
Further grammar and typo fixes in Hungarian translation.
SERVER_PROC - Unused in admincmd.sma and .txt too.
* Fixed param information
* Removed whitespace that prevented the API to generate client_disconnected information
* Fixed documentation.
* Update lang.inc
* Documentation fix
(g/s)et_user_hitzones() functions weren't generating properly in the API due to a whitespace in front of the comment blocks. @return for give item() was missing.
* Whitespace prevented API documentation from generating
* Update lang.inc
The important parts have been updated* and the missing parts added according to my best knowledge.
*admincmd.txr was UTF8 instead of UTF8 without BOM, I'm not sure it was a mistake or not.
* Add JSON module
* Merge upstream changes
Fix memory leaks
* Add json include to PackageScript
* Merge upstream changes
Fix memory leaks and increase max nesting
* Fix documentation
* Use AutoPtr in managing JSON handles
* Merge upstream changes
Order of items in an array is preserved after removing an item.
* Merge upstream
* Fix crash
* Add VS projects files and fix mixed tab/spaces
* Remove erroring on "json_free"
* Add comments to "json.inc" file
* Remove overloaded operators
* Use of "override" keyword where needed
* Fix parameter's name
* Restmenu: Use CS_OnBuyAttempt forward to detect any buy attempt - part 1
- Removed any useless code which won't be needed anymore with forward. A lot!
* Restmenu: Use CS_OnBuyAttempt forward to detect any buy attempt - part 2
- Added the actual forward
- Because of forward passing a CSI_* constant, it's needed to refactor how is saved a blocked item. Not fully implemented everywhere because menu is going to be refactored later as well.
* Restmenu: Replace findAliasId() by cs_get_item_id()
* Restmenu: Use cvar pointers
* Restmenu: Refactor menu - part 1
Purpose:
- Convert old menus to new menus.
- Instead of having one menu with several pages, having one main menu (item types) and sub-menus (items list). More readable, more easy to naviguate and no pagination.
- Move hardcoded strings to ML
* Restmenu: Refactor menu - part 2
Purpose:
- Convert old menus to new menus.
- Instead of having one menu with several pages, having one main menu (item types) and sub-menus (items list). More readable, more easy to naviguate and no pagination.
- Move hardcoded strings to ML
- Minor visual improvements
* Restmenu: Refactor podbot stuff
- Factorized code
- Used a more direct way to set restrictions
* Restmenu: Refactor load/save config file
- Used new file natives
- Moved harcoded message header to ML
- QoL: saved restricted items will be grouped per type
- Cleaned up few things
* Restmenu: Refactor amx_restrict command
- Minor improvements on how are retrieved/handled arguments from command.
- Same as menu, it displays first classes list, then it lists associated items. No more pagination.
- Minor visual changes.
* Restmenu: Remove unused stuffs
* Restmenu: Move more harcoded messages to ML
* Restmenu: Move MAPSETTINGS define to cvar
- Don't forget me in changelog
- There is room for improvements but for now keep the same behavior
* Restmenu: Add some consistency, no code change
- Renamed some variables
- Changed functions order
- Removed extra spaces
- Fixed leading tabs
* Restmenu: Use inline formatting at various places
* Restmenu: Make command descriptions multilingual for player
* Restmenu: Refresh opened menus if the command is used to save/load/set.
Also, I've removed the renaming of "exit" item because it was misleading as it returns MENU_EXIT when it's named with "back" and handling the action wiht that doesn't make much sense.
* Restmenu: Adjust minor things (consistency, readability, safety)
* Restmenu: Show the current category when items are listed through the command
* Restmenu: Display admin activity on loading/saving
+ load: reset blocked items only if file has been loaded
+ load: ignored if no arguments
+ save: added a silly fix because of the cvars
* Compile as static library, update AMBuildScript and link to core
* Update VS project files to include the library
* Add UTF-8 Rewind library (v1.5.1) to third_party directory
* Update ACKNOWLEDGEMENTS.txt
* Move AMXX buffer in its own function
* Move constants from string.inc to string_const.inc and update project files
* Move stocks from string.inc to string_stocks.inc and update project files
* Improve UTF-8 support in containi() and update documentation
* Improve UTF-8 support in strcmp() and update documentation
* Improve UTF-8 support in strfind() and update documentation
Worth to be noted that this native with ignorecase set was not working properly. So broken that no one reported the issue.
This adds also a safety check for "pos" parameter to not go < 0.
* Improve UTF-8 support in strncmp() and update documentation
* Improve UTF-8 support in equali() and update documentation
* Add an option to some UTF-8 Rewind functions for avoiding invalid data to be replaced
By default it replaces any invalid byte or sequence of bytes by 0xFFFD (3 bytes). It can be problematic when the input buffer is not changed (from a plugin) and that some natives need to calculate a position from the converted string. With such replacement, the position is displaced due the final string length being larger.
This compiles the library as C++, because I added some silly param with a default default value which is not supported by C.
* Improve UTF-8 support in replace_string/ex() and update documentation
* Add is_string_category() and update documentation
* Update a little testsuite plugin (and fix linux compilation)
* Add mb_strotolower/upper() and update documentation
* Add mb_ucfirst() and update documentation
* Add mb_strtotile() and update documentation
* Improve UTF-8 support in get_players() and find_player() with name/case insenstive flags set
* Fix KliPPy's complain
* AdminHelp: Use semicolon everywhere
* AdminHelp: Translate amx_help description
* AdminHelp: Use the available ADMIN_ALL define in register_concmd
* AdminHelp: Bind the cvars
* AdminHelp: Replace %L by %l
* AdminHelp: Remove task only when necessary
* AdminHelp: Reorder some lines to prepare next commit
* AdminHelp: Use read_arg_int() on the first argument and clamp the value
* AdminHelp: Use read_arg_int() on the second argument and clamp the value
* AdminHelp: Rename few variables and callback
* AdminHelp: Use constants for buffers max length
* AdminHelp: Add amx_searchcmd command, and update the multilingual file
* AdminHelp: Adjust spacing a little for readability
* AdminHelp: Add amx_help_display_msg_time cvar
* AdminHelp: Add the new command in the help message (and fix missing return)
* AdminHelp: Add a check if provided entry no. goes above the total found entries
* AdminHelp: Don't show the help message for begin if all commands are already displayed
* AdminHelp: Make sure the server command use amx_help_amount_per_page value
* elog_message
Like "log_message". Logs a message to the current server log file, however the messages sent are also sent to all plugins and can be hooked using "register_logevent".
* Update amxmodx.cpp
* Update Editor.sci
* Update UnitfrmMain.dfm
xs_vec_len_2d returns the length of a 2D vector
xs_vec_distance returns the distance between two vectors
xs_vec_distance_2d returns the distance between two 2D vectors
xs_vec_add_scaled and xs_vec_sub_scaled do two operations
in one for convenience and performance. They add/subtract a vector
scaled by a scalar to another vector. Very useful when working with
unit vectors.
* Module rewrite
- WinSock version changed from 1.1 to 2.2.
- Properly check for WinSock initialization on OnAmxxAttach/Detach.
- Now natives will not be added if we can't start up WinSock.
- socket_open() is now IP version agnostic (both IPv4 and IPv6 are
supported).
- Error reporting has been changed on socket_open(), a new parameter
called _libc_errors has been added, and, if enabled, libc errors will be
returned instead of the previous made-up errors.
- socket_close() now returns a value on success/failure.
- Added non-blocking sockets at socket_open_nb().
- Added socket_is_writable() to check if a socket is ready for write.
- Added socket_is_readable() as an alias to socket_change().
- Code rewritten to be more readable, it should be self-explaining now.
* Update docs and fix AMBuild
Updated documentation following the guidelines
* Fixs for the module
- Fixed the backwards compatibility with the return codes
- Merged socket_connect and socket_connect_nb
- Added a 5th parameter to socket_open that takes bit flags to enable
the new features (libc errors & nonblocking sockets)
- Fixed an error on socket_send2 that caused the buffet not to start
from the beginning if multiple calls were made
- Updated docs
- [docs] Prefixed error codes with SOCK_
- [docs] Added the new flags SOCK_NON_BLOCKING and SOCK_LIBC_ERRORS
- [docs] Added a new stock called SOCK_ERROR_EINPROGRESS(error) to be
used when checking if a newly created nonblocking socket is connecting
* Fixes for the docs
Fix some typos, shorten lines, document SOCK_ERROR_EINPROGRESS
* Document magic numbers
No more magic
* Revert "Document magic numbers"
This reverts commit 0f233292063400ea7fdbcd5e5d5cd6e54f8cd71c.
* More docs fixes
* Fix broken socket_send2()
* Add error checking in send2()
* Remove stock
It should not be needed because nb sockets should always be checked or
writability
* Fix some identations
* Fix return codes doc
* Fix socket_recv() regression
strncopy will stop on a null byte, that makes the function unusable to
receive binary data
* More docs typo fixes
* Rename client_disconnected to client_disconnecting
* Add client_disconnected as post forward
* Fix client not properly disconnected internally
Introduced in #264.
Edict is reset once SV_DropClient is called, so that second check would be always false.
* Reflect changes on the concerned plugins
* Revert renaming, let's add only client_remove as post forward
This is bad, what it currently means `Votacao Iniciada` (Votação Iniciada) in english is `The voting has been started`, instead of `Start voting`.
The translator translate it back as `Voting Started`.
Translator link: https://translate.google.com.br/#pt/en/Vota%C3%A7%C3%A3o%20Iniciada
* Revert "Extend "read_argv" native"
This reverts commit aaa2934595.
This broke binary compatibility with either older, already compiled
plugins, or newly compiled plugins if you forgot to update .inc headers.
This happened because read_argv used to receive maxlen by value, and
after
this commit it receives it by reference. This causes read_argv either
to fail, or worse, to buffer overflow, resulting in a security vulnerability.
Newly introduced functionality for read_argv should be added with a new,
separate native.
* Add "read_argv_int" & "read_argv_float" natives
The api says that the user_silentkill() "Kills a user without a message.", that means it is just user_kill() without sending deathmsg.
But user_silentkill() automatically kills player without affecting the client's score (and that is not mentioned in api), so i'll add a second parameter to user_silnetkill() to let user to decide if he want to kill a player without or not affecting the table.
New parameter has the default value 1, so it won't break the compatibility.
- The logic around CS_OnBuy forward has been simplified. Since there is no way to have a consistent way to hook/block for all items, the new logic is to have as less as possible code, especially in blocking mode where we want to avoid to do extra stuffs (e.g blocking sound, event, etc).
* All guns + shield -> CanBuyThis()
* Nvgs and Fefuser only -> CanPlayerBuy()
* The others items -> GiveNamedItem() + AddAccount()
* Ammos -> -> BuyGunAmmo() + GiveNamedItem() + AddAccount()
- Fixed missing buyzone check when alias from console are used (CS_OnBUy* were incorrectly fired).
- Fixed an infinite loop when buying of ammos are blocked. Sorted by hooking BuyGunAmmo().
- Fixed blocking mode for some items. Some game behaviors were not blocked (e.g. weapon drop).
- Fixed forwards being triggered even though errors were found. Detours are now a destroyed and associated variables resetted when necessary. Toggling forwards state is now based on detours state.
- Moved things in its own functions (game functions to execute, class members retrieval)
- Renamed CommandAliases -> ItemInfos (more generic)
This is actually not possible to have a proper system to allow this.
This is two majors problems:
- The item price text can't be changed, whatever old and VGUI menu (it's either harcoded in config file or in client binary)
- Once you open VGUI menu, to know if user has enough money to select an item, client relies on the current HUD money value, this means, since we can't directly changed price, before opening the menu, money needs to be somehow faked and restored once closed. It's awful.
Overall it can't work properly, and at the end current forward doesn't make sense.
If an author wanted to have its own prices, the only only way would to force players to use old menu, then overwriting the whole buy menu, so you would be able to display what you want exactly.
Related to #266. Looks like I've changed the prefix afterward at some point for some reason, but engine is retarded and with `plugin.something.cfg` it will understand extension is `something` instead of `cfg` ; and will fail to execute as it's an invalid extension (only `cfg` and `rc` are allowed).