Plugin Info:
|
Modification: ALL
Category: Admin Commands
Approver: Arkshine (91)
|
Veteran Member
Join Date: Aug 2009
Location: Virginia
|
10-21-2011
, 19:24
Player-Based CVARs
|
#1
|
Player-Based CVARs
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:
Code:
[1]
mp_freezetime 2
mp_startmoney 8000
sv_gravity 200
[3]
mp_freezetime 1
mp_startmoney 1000
sv_gravity 800
- In brackets '[]', include how many players you want in the server when the commands below it execute.
Changelog:
Code:
October 21, 2011 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
Notes:
- 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.
__________________
Quote:
Originally Posted by DarkGod
nikhilgupta generates his plugins using sheer awesome.
|
If you like my work, please
Last edited by nikhilgupta345; 07-07-2012 at 00:28.
|
|
|
|