Raised This Month: $7 Target: $400
 1% 

Multi-Mod Manager v1.1-release_candidate1.hotfix1 | Last Update: 21.01.2016


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 10-10-2015 , 22:41   Multi-Mod Manager v1.1-release_candidate1.hotfix1 | Last Update: 21.01.2016
Reply With Quote #1


Multi-Mod Manager v1.1-release_candidate1.hotfix1
Release: 10.10.2015 | Last Update: 21.01.2016

Contents' Table

Basic differences between the original Joropito's MultiMod and addons_zz's Multi-Mod Manager

addons_zz's Multi-Mod Manager can:
  1. display colored text messages.
  2. easily implemented any new feature that you want, as it is a fully documented plugin.
  3. improve its code as it is well software engineered.
  4. easily manage extremely big mod plugins files and mods configurations files.
  5. easily manage extremely big mods amount.
  6. to have unlimited MODS installed.
  7. install the fully compatible "multimod_daily_changer" provided here.
  8. install the fully compatible and new "Galileo" provided here.
  9. unload metamod csdm modules automatically after disable the csdm mod, or before enable any another mod, as long as you configure it.
  10. restore server's cvars and server's commands automatically after disable any mod, or before enable another mod, as long as you configure it.
  11. install/use every mod that exists and will exists in the universe, without any special plugin or any "Multi-Mod Manager" modification,
    as long as this mod you wanna install runs at an AMXX very own default install.
  12. if you want to, you can have any mod activated never ever at you server, even if there is more then 10 installed and fully working mods.
  13. use the command "amx_setmod help 1" display the acceptable inputs and loaded mods
    from the file "yourgamemod/addons/amxmodx/configs/multimod/voting_list.ini".
  14. automatically execute late configuration file execution to built-in AMXX per map configurations.
  15. automatically to restaure the first mapcycle used.
  16. freeze the game and show the scoreboard when activating a mod silently, using the command "amx_setmods".
  17. use the command 'amx_setmod modShortName <1 or 0>', to enable the mod "modShortName" as csdm,
    starting a vote map (1) or not (0), right after. This command can only active mods loaded from
    "voting_list.ini" file, and needs an admin level ADMIN_CFG.
  18. use the command 'amx_setmods modShortName <1 or 0>', to enable the mod "modShortName" as surf,
    restarting (1) or not (0) the server immediately, silently. This command can active any mod installed at the server
    despite it is or it is not at the "voting_list.ini" server configuration file. And most important, it needs an admin level ADMIN_IMMUNITY.
  19. use the cvar amx_multimod_endmapvote <0 - 1> to enable (1) or disable (0) end map automatic multi-mod voting.
  20. waits as long as you want to choose to activate one mod or not, by vote menu and by command line.
  21. at voting keep the current mod, if less than 30% voted, or keep it disabled if there is no mod enabled.
  22. see the voting results details at server's console.
  23. keep the server's current mod at voting as the vote menu's first option is always: "1. Keep Current Mod".
  24. disable the server's current mod at voting as the vote menu's second option is always: "2. No mod - Disable Mod".
  25. see that are any mod currently activated, when you type "say currentmod" and there is no mod active.
  26. execute a special server's configuration file at the comment you active a server's mod. That is executed only and only at the
    mod first activation time by the command "amx_setmod" (the silence one, "amx_setmods" has not this feature, because it is silent).
  27. receive a clear and self-explanatory error message when you mis-configure the mod plugins file name/location.
  28. server's admins with right flag can change the server's current mod without needing direct access like ftp, to the server's files.

See its current development at: Github

https://github.com/addonszz/MultiMod_Manager

(look for the developer and feature branches)

The original plugin "multimod.sma" is originally written by JoRoPiTo. This "Multi-Mod Manager" works
differently from the original "MultiMod Manager". See Credits for information.

This is a release candidate, which is a beta version with potential to be a final product, which is ready to be
released unless significant bugs emerge. In this stage of product stabilization, all product features have been
designed, coded and tested through one or more beta cycles with no known show stopper-class bug.

This plugin is not compatible with the AMXX's very own Map Chooser or "Daily Maps", but yes with its
modification "multimod_daily_changer" provided here. The new Galileo
which is a different Galileo version, is ready to be used with this Multi-Mod Manager".

The "Multi-Mod Daily Maps" is a modified version of "Daily Maps" to work with this "Multi-Mod Manager".
This plugin only works with "Multi-Mod Manager", alone the "Multi-Mod Daily Maps" does nothing. Its allows
you to specify a different "mapcycles" and "server cfg" files rotation, for every day. These daily mapcycles are
only active when you are not using any mod, or your current mod does not specifies a special mapcycle. The
"mapcycles" and "server cfg" files respectively, are located at "yourgamemod/mapcycles/day" and
"yourgamemod/mapcycles/day/cfg".

Click here to see all servers using this plugin.



********************** Introduction Go Top *******************************
This is a multi-mod server manager, that controls which mod is, or will be activated.
A mod can be activated by vote (say votemod), or by force (amx_setmod or amx_setmods).

There is a list of mods (voting_list.ini) that decides which mods will show up at a mod vote.
The vote mod supports a multi-page menu, that display unlimited Mods loaded from “voting_list.ini” file.



The "multimod_manager.sma" waits the user choose to activate one mod, by vote menu,
or by command line. It saves the current active mod and keep it active forever or until some
other mod is activated or your disable the active mod by the "amx_setmod disable 1" command.

Features' list:
Quote:
* Changes the default mapcycle, if and only if a custom mod mapcycle was created.

* The vote menu's first to options always are: "1. Keep Current Mod" and "2. No mod - Disable Mod".

* The vote mod keep the current mod, when less than 30% of players voted.

* When the min vote mod time is not reached/disabled, display a message informing it.

* Command 'amx_votemod', to start force start a vote mod, even if it is disabled. This command can
only active mods loaded from "voting_list.ini" file, and needs an admin level ADMIN_MAP.

* Command 'amx_setmod modShortName <1 or 0>', to enable the mod "modShortName" as csdm,
starting a vote map (1) or not (0), right after. This command can only active mods loaded from
"voting_list.ini" file, and needs an admin level ADMIN_CFG.

* Command 'amx_setmods modShortName <1 or 0>', to enable the mod "modShortName" as surf,
restarting (1) or not (0) the server immediately, silently. This command can active any mod installed
at the server
despite it is or not at the "voting_list.ini" server's configuration file. And most important,
it needs an admin level ADMIN_IMMUNITY.

OBS: A mod can only to be/get activated after a restart.
The command "amx_setmod help 1" display the acceptable inputs and loaded mods
from the file "yourgamemod/addons/amxmodx/configs/multimod/voting_list.ini". There is
2 built-in operations beyond mods activation: "amx_setmod help 1" and "amx_setmod disable 1",
respectively to shows help and disable any active mod.



If enabled (default disabled), when remaining 5 minutes to end current map, this plugins launches a vote to
choose which mod will be played at the next map. If less than 30% voted, the game keep the current mod
or keep it disabled if there is no mod enabled.

Example of "amx_setmod help 1":
Code:
amx_setmod help 1                | To show this help.
amx_setmod disable 1             | To deactivate any active Mod.
amx_votemod                      | To force a votemod.
say_team nextmod                 | To see which is the next mod.
say currentmod                   | To see which is the current mod.
say votemod                      | To try start a vote mod.
say_team votemod                 | To try start a vote mod.
amx_setmod csdm 1                | to use CS-DM (DeathMatch)
amx_setmod catch 1               | to use Catch Mod
amx_setmod dragon 1              | to use Dragon Ball Mod
amx_setmod gungame 1             | to use Gun Game Mod
amx_setmod hiden 1               | to use Hide N Seek Mod
amx_setmod jctf 1                | to use Just Capture The Flag
amx_setmod knife 1               | to use Knife Arena Mod
amx_setmod predator 1            | to use Predator Mod_b2
amx_setmod shero 1               | to use Super Heros
amx_setmod surf 1                | to use Surf Mod
amx_setmod warcraft 1            | to use Warcraft Ultimate Mod 3
amx_setmod zp50Money 1           | to use Zombie Mod with Money
amx_setmod zp50Ammo 1            | to use Zombie Mod with AmmoPacks
amx_setmod ttt 1                 | to use Trouble in Terrorist Town
amx_setmod deathrun 1            | to use Deathrun Mod
********************** Requirements and Commands Go Top ******
Amx Mod X 1.8.2 or higher only

Cvars:
Quote:
// Minimum time to play before players can make MOD voting.
amx_mintime 10

// enable (1) or disable (0) end map automatic multi-mod voting.
amx_multimod_endmapvote 0

// enable (1) or disable (0) multi-mod voting (say votemod).
amx_multimod_voteallowed 1
Commands:
Quote:
//Command line control of multimod system
amx_setmod
amx_setmods

//Admin only command to launch MOD voting
amx_votemod

//Check which MOD will be running in next map
say nextmod
say_team nextmod

//Check which MOD is running in the current map
say currentmod
say_team currentmod

//Player command to launch MOD voting
say votemod
say_team votemod
There is a Multi-Mod Server Configuration with:
  • CS-DM (DeathMatch)
  • Catch Mod
  • Dragon Ball Mod
  • Gun Game Mod
  • Hide N Seek Mod
  • Just Capture The Flag
  • Knife Arena Mod
  • Predator Mod_b2
  • Super Heros
  • Surf Mod
  • Warcraft Ultimate Mod 3
  • Zombie Money Mod
  • Zombie Pack Ammo Mod
Is available here.

******************************** Installation Go Top **********************
1. Download the files "multimod_manager.sma", "configuration_files.zip",
"galileo.sma" and "multimod_daily_changer.sma"(this is optional), at Downloads section.

2. Then take the contents of "yourgamemod" from "configuration_files.zip", to your gamemod folder.

3. Compile the files and put the compiled files to your plugins folder at
"yourgamemod/addons/amxmodx/plugins" folder.

4. Put the next lines to your "plugins.ini" file at "yourgamemod/addons/amxmodx/configs" and
disable the original "mapchooser.amxx":
Quote:
multimod_manager.amxx
multimod_daily_changer.amxx
; Choose
galileo.amxx
5. Put the next line to your "amxx.cfg" file at "yourgamemod/addons/amxmodx/configs":
Quote:
exec addons/amxmodx/configs/multimod/multimod.cfg
6. Configure your own mods at "yourgamemod/addons/amxmodx/configs/multimod/voting_list.ini"
file as follow (the short mod name cannot be longer than 15 characters neither have spaces):

--- Example of: yourgamemod/addons/amxmodx/configs/multimod/voting_list.ini ------
Quote:
[Gun Game]:[gungame]:

;[mode name]:[shortModName]:
-------------- And you have to create the files:----------------------------
Quote:
yourgamemod/addons/amxmodx/configs/multimod/plugins/gungame.ini

(Optinal files)
yourgamemod/addons/amxmodx/configs/multimod/cfg/gungame.cfg
yourgamemod/addons/amxmodx/configs/multimod/latecfg/gungame.cfg
yourgamemod/addons/amxmodx/configs/multimod/msg/gungame.cfg
yourgamemod/mapcycles/gungame.txt
-------------- Explanations Go Top -------------------------

1. The file "yourgamemod/addons/amxmodx/configs/multimod/plugins/gungame.ini",
contains the plugins that compose the Mod like:
Quote:
gungame.amxx
2. The file (opcional) "yourgamemod/addons/amxmodx/configs/multimod/cfg/gungame.cfg",
contains yours special configuration used at the mod activation, like:
Quote:
amxx pause amx_adminmodel
sv_gravity 600
3. The file (opcional) "yourgamemod/addons/amxmodx/configs/multimod/cfg/gungame.cfg",
contains yours special configuration used after the mod deactivation, like:
Quote:
amxx unpause amx_adminmodel
sv_gravity 800
4. The file (opcional) "yourgamemod/addons/amxmodx/configs/multimod/msg/gungame.cfg" contains
commands that are executed when a mod is activated by the command line "amx_setmod".
Usually it contains a command to restart the server.
Example of "yourgamemod/addons/amxmodx/configs/multimod/msg/gungame.cfg":
Quote:
amx_execall speak ambience/ratchant
amx_tsay ocean GUN-GAME will be activated at next server restart!!!!
amx_tsay blue GUN-GAME will be activated at next server restart!!!!
amx_tsay cyan GUN-GAME will be activated at next server restart!!!!
amx_tsay ocean GUN-GAME will be activated at next server restart!!!!

//amx_countdown 5 restart
exec addons/amxmodx/configs/multimod/votingfinished.cfg
5. The file (opcional) "yourgamemod/mapcycles/gungame.txt" contains the mapcycle used when
gungame mod is active.

******************************** TODO Go Top *********************************
  • Create a new folder called cvars, to list the cvars to autosave to the latecfg file name. An give an option to autodetect the changed cvars from the './multimod/cfg' folder.
  • Create a option to automatically create a file at '.configs/maps' folder, to autoload a mod on its maps types, as deathrun on deathrun_/zm_ prefixes maps names. To do this, add at the voting_list, a last parameter specifing the map_prefix where that mod must be autoloaded.
******************************** Change Log Go Top ***********************
Code:
2015-10-10 | v1.0-release_candidate1
 * Initial release candidate.

2015-10-10 | v1.0-release_candidate1.hotfix1
 * Add exception handle when the currentmod_id.ini or currentmod_shortname.ini is not found.

2015-10-12 | v1.0-release_candidate2
 * Removed unused function get_firstmap() and variable g_nextmap.
 * Replaced unnecessary functions configMapManager and configDailyMaps.
 * Removed unnecessary MULTIMOD_MAPCHOOSER compiler constant.
 * Added to multimod_daily_changer.sma compatibility with Galileo.

2015-10-13 | v1.0-release_candidate2.hotfix1
 * Added missing format parameter at messageModActivated function.

2015-10-13 | v1.0-release_candidate2.hotfix2
 * Added missing MM_CHOOSE line at multilingual file.

2015-10-19 | v1.0-release_candidate2.hotfix3
 * Translated to english lost code variables.
 * Replaced a implemented switch by a native switch.
 * Replaced another implemented switch by a native switch.
 * Improved variables names meaningful.

2015-10-21 | v1.0-release_candidate2.hotfix4
 * Fixed mapcycle not setting when a mod was activated by command line or voting.

2015-10-25 | v1.1-alpha1
 * Added late configuration file execution to built-in AMXX per map configurations.
 * Added to restaure the first mapcycle used.
 * Improved code clearness.
 * Added path coders to every multi-generated string.
 * Added immutable strings paths as global variables.
 * Removed passing an integer value to a function by string.
 * Removed unnecessary variables like g_messageFileNames and g_pluginsFileNames.

2015-10-30 | v1.1-alpha1.hotfix1
 * Fixed the mod map cycle not changing.

2016-01-16 | v1.1-release_candidate1
 * Replaced wrong color chat system with correct one.
 * Use the actual current mod map cycle, right after a vote mod, instead the previous one.
 * Updated modification type to all GoldSrc engine games.
 * Fixed LANG_PLAYER misuse.
 * Fixed server_print overuse.
 * Fixed printing info to the client in a for loop can cause an overflow.
 * Implemented dynamic arrays, to have unlimited models.
 * Fixed bug, where was enabled to set a invalid mapcycle.

2016-01-21 | v1.1-release_candidate1.hotfix1
 * Fixed voting reset bug.
******************************** Credits Go Top *******************************
fysiks: The first to realize the idea of "multimod.sma" and various code improvements.
joropito: The idea/program developer of "multimod.sma".
crazyeffect: Colaborate with multilangual support of "multimod.sma".
dark vador 008: Time and server for testing under czero "multimod.sma".
Brad: The original Galileo developer.
Th3822: For find a error from map_nominate.
Addons zz: This plugin developer.
ConnorMcLeod: For the [Dyn Native] ColorChat v0.3.2 (04 jul 2013) functions.
JustinHoMi & JGHG: For the "Daily Maps" plugin.
HamletEagle: For some code improvements as unlimited mods number.

******************************** Source Code and Support Go Top ***
For any problems with this plugin visit this own page for support:
https://forums.alliedmods.net/showthread.php?t=273020

If you are posting because the plugin or a feature of the plugin isn't working for you, please do
all of the following, so we can more efficiently figure out what's going on:
Quote:
If you have access to your game server's console, type the following in the server console:
  • status
  • meta list
  • amxx list
  • amxx cvars
If you don't have access the your game server's console, join your server and type the
following in your game console:
  • status
  • rcon_password your_rcon_password
  • rcon meta list
  • rcon amxx list
  • rcon amxx cvars
  1. Paste here everything from the status command *except* the player list.
  2. Paste here the entire result from the meta list and amxx plugins commands.
  3. Paste here *only* the CVARs that contain "multimod_manager.amxx" in the last column
    from the amxx cvars command. They will be grouped together.
******************************** Downloads Go Top ********************
  • Old versions downloads:
    1. v1.1-alpha1.hotfix1: (multimod_manager.sma - 72 views - 66.8 KB)

  • galileo.sma
Attached Files
File Type: sma Get Plugin or Get Source (multimod_daily_changer.sma - 2167 views - 3.9 KB)
File Type: sma Get Plugin or Get Source (multimod_manager.sma - 2342 views - 65.3 KB)
File Type: zip configuration_files.zip (104.0 KB, 1343 views)

Last edited by addons_zz; 03-03-2016 at 16:47. Reason: Launching the v1.1-release_candidate1.hotfix1
addons_zz is offline
vedant007
Member
Join Date: Jul 2013
Old 10-14-2015 , 10:21   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #2

Nice Plugin!

Last edited by vedant007; 10-19-2015 at 12:40.
vedant007 is offline
Send a message via Skype™ to vedant007
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 10-14-2015 , 10:25   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #3

Quote:
Originally Posted by vedant007 View Post
Nice Plugin!
Thank you. This is actually it looks harder, but is a lot easier. Now I am going to just try to
explain a more simple way to have the plugin configured.

The problem is that I develop a lot of features, but at short term you can just create a 'txt' file of the mod name plugins file at ./configs/plugins/mymod.txt

Then to active the mod just type at server console:
Quote:
amx_setmods mymod 1
And you are done. Later to disable the mod, just type:
Quote:
amx_setmod disable 1
But if you want that mod to show up at the voting, just edit the file ./configs/multimod/multimod.ini and add the line:
Quote:
[My Cool Mod]:[mymod]:
Hence, want more easier then this? Simple like that you can install gungame, csdm, zombie, catch, hide n seek, deathrun, jailbreak, ... at you server and never more have to worry about uninstall one to install another one.

Last edited by addons_zz; 10-20-2015 at 06:33.
addons_zz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2015 , 19:47   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #4

  • You should never return a string from a function. Strings should always be passed by-ref with the max characters passed as another parameter. Then, in the function, you would either format directly into that string using the size provided or use copy().
  • Don't pass an integer value to a function by putting it in a string. Just pass the integer. E.g. msgResourceActivated(). If the original source of the value is from a string like read_argv() then you should convert it to an integer before passing it to a function like primitiveFunctions().
  • If you are going to use the multilingual system to print to the server console, you should not use LANG_PLAYER; that just doesn't make sense. You should use LANG_SERVER.
  • This will only work with Counter-Strike (because of color chat) and thus your submission should not be labeled as "Modification: ALL".
  • Your code needs to be in English (this is a rule for plugin submissions).
  • You should use a switch() in configureMultimod() instead of conditionals because all three cases are mutually exclusive. The third case can be the "default" case.
  • IIRC, printing info to the client in a for loop can cause an overflow. Simply build the whole text into a single string and then send that only once. You can create multiple lines by using "^n".
  • The use of server_print() should be rare and mostly for debugging. For registered commands, it should only be used with register_srvcmd() (unless it's for debugging of course).
  • When you register a command with register_concmd(), you should only use console_print() to output information. Likewise, when you register a command with register_clcmd(), you should only use client_print(id, print_chat, ...) and client_print(id, print_console).

I'm sure there is more but I am done for now.


Quote:
Originally Posted by addons_zz View Post
And even better, server's admins with right flag can change the server's current mod without needing direct access like ftp, to the server's files.
lol This is not special. It's just a consequence of doing this sort of thing and can be done with both Polymorph and Joropito's MultiMod (afaik).
__________________

Last edited by fysiks; 10-14-2015 at 19:49. Reason: typo
fysiks is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 10-16-2015 , 16:55   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #5

Thank you for you time.

Quote:
Originally Posted by fysiks View Post
You should never return a string from a function. Strings should always be passed by-ref with the max characters
passed as another parameter. Then, in the function, you would either format directly into that string using the size
provided or use copy().
Coming soon: mapCyclePathCoder( stringToCode, sizeof( stringToCode ) - 1, stringCoded )

Quote:
Originally Posted by fysiks View Post
Don't pass an integer value to a function by putting it in a string. Just pass the integer. E.g. msgResourceActivated().
If the original source of the value is from a string like read_argv() then you should convert it to an integer before
passing it to a function like primitiveFunctions().
Yea, I should convert it to integer.

Quote:
Originally Posted by fysiks View Post
If you are going to use the multilingual system to print to the server console, you should not use
LANG_PLAYER; that just doesn't make sense. You should use LANG_SERVER.[*]This will only work with Counter-Strike (because of color chat) and thus your submission
should not be labeled as "Modification: ALL".
I posted wrong, and I was misleading the LANG_PLAYER and LANG_SERVER's use.
It will be fixed. And I forgot, this will be modification ALL, but it is not currently modification ALL.
It will be correct at threads page until it is definitely modification all.

Quote:
Originally Posted by fysiks View Post
Your code needs to be in English (this is a rule for plugin submissions).
It is just a variable (used a lot), and more 4 or 5. Despite that, all the code is 100% documented in english,
hence such thing would not be a problem, and some similar english variables names at a fully documented code, is a much way better than a zero documented code.
But, no worries, I will do a replace.

Quote:
Originally Posted by fysiks View Post
You should use a switch() in configureMultimod() instead of conditionals because all three
cases are mutually exclusive. The third case can be the "default" case.
This was my fail, I literally implemented a switch, instead of using a switch.

Quote:
Originally Posted by fysiks View Post
IIRC, printing info to the client in a for loop can cause an overflow. Simply build the whole text into
a single string and then send that only once. You can create multiple lines by using "^n".
It is the same problem as the AMXX very own "adminhelp.sma". I cannot build I a big string as pawn is limited.
I must limit the output number as "adminhelp.sma", receiving a page list number to show and limit
each page to show only a big string supported.

Quote:
Originally Posted by fysiks View Post
The use of server_print() should be rare and mostly for debugging. For registered commands,
it should only be used with register_srvcmd() (unless it's for debugging of course).
I did not know this register_srvcmd(). Then now I can register a register_srvcmd to server_print, and another register_clcmd to client_print.

Quote:
Originally Posted by fysiks View Post
I'm sure there is more but I am done for now.
Of course, there is more clever programing techniques to learn:
  1. use tries instead of g_modShortName.
  2. count better current playing player at playersPlaying.
  3. copy more efficiently a files at copyFiles and copyFiles2.
  4. print colored text more efficiently than at print_color.
  5. receive commands more efficiently than "command arg1 arg2" even a for 1 argument command.

Quote:
Originally Posted by fysiks View Post
Quote:
Originally Posted by addons_zz View Post
And even better, server's admins with right flag can change the server's current mod without needing direct access like ftp, to the server's files.
lol This is not special. It's just a consequence of doing this sort of thing and can be done with both Polymorph and Joropito's MultiMod (afaik).
You are absolutely right. This can be achieved with both fysiks' Polymorph and Joropito's MultiMod.
You both can update your's threads with this information. Hence sorry, I forgot to elaborate a basics diferences table.
Then this cannot be just a sort of things, it took me a lot time effort's to develop,
as its code now seen, my goal is to develop maintainable code, for example, it is completely documented.
Nowadays prefer to do adaptive maintenance modifying the system to scope with changes in the software environment.

Last edited by addons_zz; 10-16-2015 at 16:58.
addons_zz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-16-2015 , 23:21   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #6

Quote:
Originally Posted by addons_zz View Post
Coming soon: mapCyclePathCoder( stringToCode, sizeof( stringToCode ) - 1, stringCoded )
Use charsmx() for string instead of sizeof - 1.

Quote:
Originally Posted by addons_zz View Post
It is just a variable (used a lot), and more 4 or 5. Despite that, all the code is 100% documented in english,
hence such thing would not be a problem, and some similar english variables names at a fully documented code, is a much way better than a zero documented code.
But, no worries, I will do a replace.
I didn't make the rules and they state everything must be in english.


Quote:
Originally Posted by addons_zz View Post
It is the same problem as the AMXX very own "adminhelp.sma". I cannot build I a big string as pawn is limited.
I must limit the output number as "adminhelp.sma", receiving a page list number to show and limit
each page to show only a big string supported.
It might work for a small number of lines. Pawn does not have any limitation on how big you can make a string (the OS is the limitation here). However, I'm guessing there is a limit on how long of a string you can print due to the game but I'd guess it'd be hard to hit. IIRC, your string isn't going to be that long when you include all of the text in a single string.

Quote:
Originally Posted by addons_zz View Post
I did not know this register_srvcmd(). Then now I can register a register_srvcmd to server_print, and another register_clcmd to client_print.
Maybe I was a little too definitive when I said what I said about this topic. I wouldn't always assume that (it is a rule of thumb) because there are some cases where you might need to use client_print() in a server command. It's better to understand the difference between the three different types of commands and prints that you can use: server, console, and client.

Quote:
Originally Posted by addons_zz View Post
print colored text more efficiently than at print_color.
Not if you want it to be for all modifications. You need to either remove color chat entirely or properly compensate for non-Counter-Strike mods. I'd personally recommend the former.

Quote:
Originally Posted by addons_zz View Post
receive commands more efficiently than "command arg1 arg2" even a for 1 argument command.
I'm not really sure what you mean here.


Quote:
Originally Posted by addons_zz View Post
Then this cannot be just a sort of things, it took me a lot time effort's to develop,
as its code now seen, my goal is to develop maintainable code, for example, it is completely documented.
FYI, documented code doesn't make it maintainable but often maintainable code contains a reasonable amount of documentation. You still need to code it intelligently by using the proper structures and organization.
__________________

Last edited by fysiks; 10-16-2015 at 23:22.
fysiks is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 10-17-2015 , 18:57   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
Use charsmx() for string instead of sizeof - 1.
Why? Brad used it a lot (104 times) at his Galileo, to accomplish the same task.
I mean, what does you know, that he doesn't know, at the time he wrote the code.

Quote:
Originally Posted by fysiks View Post
I didn't make the rules and they state everything must be in english.
Was just some variables well english documented, so any english reader can understand code.
This is what is supposed to mean the rule, everything must be in english, i.e., English readers
must to understand without consulting those ambiguous translators. Because if it is not english,
they should consult the translator, and translators are bad interpreters.
But of course, very well named english variables became easier to the native english readers to understand the code without
learning/consulting all the time, its documentation.
Those variables were not english because the I written the code originally at another language,
and at the translation process they were forgotten.

Quote:
Originally Posted by fysiks View Post
It might work for a small number of lines. Pawn does not have any limitation on how big you can make a string (the OS is the limitation here). However, I'm guessing there is a limit on how long of a string you can print due to the game but I'd guess it'd be hard to hit. IIRC, your string isn't going to be that long when you include all of the text in a single string.
I must test it, then know which one is exactly, and if I found a good solution, I would do a pull request to that horrible "amx_help" command at "adminhelp.sma".

Quote:
Originally Posted by fysiks View Post
Maybe I was a little too definitive when I said what I said about this topic. I wouldn't
always assume that (it is a rule of thumb) because there are some cases where you might
need to use client_print() in a server command. It's better to understand the difference
between the three different types of commands and prints that you can use: server, console, and client.
No way, and of course. However I just explained how I needed to use it, at that case.

Quote:
Originally Posted by fysiks View Post
Not if you want it to be for all modifications. You need to either remove color chat entirely
or properly compensate for non-Counter-Strike mods. I'd personally recommend the former.
I will just recognize if I am at Counter-Strike or not, then use or not colored text.

Quote:
Originally Posted by fysiks View Post
I'm not really sure what you mean here.
For example, when I register a register_concmd as:
register_concmd("amx_coolcommand", "receiveCommand", ADMIN_CFG, g_help_coolcommand )
And type "amx_coolcommand argument1", it shows help, even if the command uses only one argument.

Quote:
Originally Posted by fysiks View Post
FYI, documented code doesn't make it maintainable but often maintainable code contains a
reasonable amount of documentation. You still need to code it intelligently by using the
proper structures and organization.
You are right. However I said, for example, which I mean, an example about what maintainable code has,
and as you said, it has documentation. I did not said: -"It is all you need to develop maintainable code".
However, thank you for this thread completeness.

Last edited by addons_zz; 10-17-2015 at 21:32.
addons_zz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-17-2015 , 23:06   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #8

Quote:
Originally Posted by addons_zz View Post
Why? Brad used it a lot (104 times) at his Galileo, to accomplish the same task.
I mean, what does you know, that he doesn't know, at the time he wrote the code.
It might not have existed when he started writing his plugin, I don't know when it was added. The biggest benefit of using it instead is self-documentation (Max Characters). Because strings and arrays are technically exactly the same thing in Pawn, it's good to use a version of sizeof that is specifically for strings.

It's also beneficial when you need to search for all strings that are passed by-ref because there should always be a charsmax() used in these cases. If you only had sizeof - 1, you would also get ALL uses of sizeof and not just strings.

Note that the performance remains unchanged because sizeof and charsmax are evaluated when you compile.
__________________
fysiks is offline
Old 10-18-2015, 09:19
vedant007
This message has been deleted by vedant007.
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 10-18-2015 , 11:36   Re: Multi-Mod Manager v1.0-release_candidate2.hotfix2
Reply With Quote #9

Quote:
Originally Posted by vedant007 View Post
Easy to use will be creative for new ones..
Hopefully will still exist new ones.

Last edited by addons_zz; 10-19-2015 at 18:22.
addons_zz is offline
Dream_Catcher
New Member
Join Date: Dec 2015
Old 12-03-2015 , 00:12   Re: Multi-Mod Manager | Last Update: 30.10.2015
Reply With Quote #10

Can't configure how to change MODs and Maps. How to do that to the people playing on the server could vote (/rtv) and would get called in the start menu, select MODs, and then Maps mod which was voted. At the end of maps as well.

And is there a possibility of extending the map without changing the MOD and Maps
Dream_Catcher is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode