By: nikhilgupta345
Description:
This plugin allows you to execute certain commands or set certain cvars when there are a certain number of players on the server. The commands are sent to the server console as soon as a player connects.
Admin Commands:
amx_addautocommand <players> <command> - Adds a command to be executed when there are "players" amount of players on the server.
amx_addautocvar <players> <cvar_name> <cvar_value> - Adds a cvar to be changed when there are "players" amount of players on the server.
Installation:
Click 'Get Plugin' link below
Place 'player_amount_cvars.amxx' in addons/amxmodx/plugins/ folder
Open addons/amxmodx/configs/plugins.ini
Add the line 'player_amount_cvars.amxx' at the bottom
Either create 'player_cvars.ini' on your own in the configs folder
Set it up to your liking.
Restart server or change map
Example 'player_cvars.ini':
An example player_cvars.ini may look like this:
In brackets '[]', include how many players you want in the server when the commands below it execute.[1]
mp_freezetime 2
mp_startmoney 8000
sv_gravity 200
[3]
mp_freezetime 1
mp_startmoney 1000
sv_gravity 800
Changelog:
Notes:October 21, 2011
-v1.0-
Initial Release
October 22, 2011
-v1.0.1-
Changed way of detecting player connect/disconnect
-v1.1-
Changed way of setting up file
Added admin commands
July 07, 2012
-v1.1.1-
Removed one of the connect methods and used one method for both hooks.
Other small optimizations
Some commands/cvars, such as mp_startmoney, will not take effect on the connecting player. For those commands, you should have it set for the player before, so it will work for the player you want it to. For example, if you want startmoney to be 10000 when there are 5 people, have "mp_startmoney 10000" under '4' in the config file.
Suggestions/Comments/Feedback are welcome.
players_cvar.txt
get plugin or get source