Commit Graph

28 Commits

Author SHA1 Message Date
Fysiks
5b1b844184
Fix incorrect uses of feof() (#957)
Using feof() as the while loop condition for detecting the end of the file is incorrect.
2021-08-07 17:28:35 +02:00
Fysiks
7fef58c374
Fix for loop index out of bounds error (#966)
Fixes an index out of bounds error when refreshMenus() and subsequently findAdminsWithMenu() is called when there is 32 players in the server. Indexing the playersList array in the for loop condition causes it to try to index with a value of 32 on the very last condition check which is not valid for this array.
2021-06-19 10:36:56 +02:00
Vincent Herbet
8e7eb94e50 Overhaul Restrict Weapons plugin - part 1 (#347)
* 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
2017-08-05 10:45:29 +02:00
Arkshine
e441908230 MAX_PLAYERS: Fix plugins 2015-02-01 19:25:36 +01:00
Freeman-AM
8d4a1ca359 Restmenu: more use of sizeof 2014-10-11 17:04:12 +02:00
Freeman-AM
54ab06493a Restmenu: fix a typo error induced by previous commit 2014-10-11 14:07:38 +02:00
Freeman-AM
71f011c70d Restmenu: replace len hardcoded content by charsmax and sizeof 2014-10-08 14:21:53 +02:00
Scott Ehlert
f787db1be5 Update license headers for plugins and includes. 2014-08-04 13:18:41 -05:00
Arkshine
07534edfcd Use the new constants in various place. 2014-07-20 12:27:02 +02:00
David Anderson
580e52bd2c CZ Bots will now follow restrictions
Fixed amb222 (rebuy could get around restrictions)
2007-04-26 19:22:23 +00:00
David Anderson
68f1ce7a52 fixed an initialization bug 2006-12-23 22:05:51 +00:00
David Anderson
e5b0ed3af1 fixed bug am48866 part 2 2006-12-23 19:01:11 +00:00
David Anderson
49e70063fa fixed bug am48866 2006-12-23 18:59:30 +00:00
David Anderson
4332d6c271 fixed bug am47617 2006-12-19 14:03:02 +00:00
Borja Ferrer
6af5516005 added request at26380 (KWo) 2006-05-21 22:02:22 +00:00
Borja Ferrer
39f4a2bc13 fixed bug at27770 2006-04-06 23:36:22 +00:00
Borja Ferrer
1a48ebb345 format fixes 2005-11-21 20:31:18 +00:00
Borja Ferrer
3324d65f3f fixed amx_restrict off and related cmds not working as they should (jtp10181) 2005-11-20 20:44:12 +00:00
Borja Ferrer
4e497d9737 fix for autobuy cmd being used if the restrictions where set after cl_setautobuy (thanks jtp10181) 2005-11-17 18:23:48 +00:00
Borja Ferrer
e8a6126473 fixed but at20342 (jtp10181) 2005-10-16 00:28:20 +00:00
Borja Ferrer
324f4c58a8 cleaned revision for cstrike plugins 2005-09-18 03:19:34 +00:00
David Anderson
b0c9b868cd Fixed bug a13718 report by faluco 2005-07-07 18:37:33 +00:00
Johnny Bergström
3074ca0756 Removed some... odd thing. 2005-02-25 18:05:50 +00:00
David Anderson
d1675c82b5 fixed a language format error 2004-10-29 02:17:58 +00:00
Johnny Bergström
eb36757ef1 Fixed menu not displaying on/off status for scout, mp5, ak47. 2004-10-05 10:01:04 +00:00
David Anderson
bff11bc18e Fixed method of illegal buying 2004-09-19 16:32:15 +00:00
David Anderson
d14c107db1 Fixed some include bugs
Fixed adminslots not showing right slots on connect
Fixed RTEs on wrong team
2004-09-19 00:52:15 +00:00
David Anderson
767795b91e Added cstrike plugins 2004-09-10 00:33:41 +00:00