View Single Post
Author Message
_KaszpiR_
AMX Mod X Beta Tester
Join Date: Feb 2004
Location: Warsaw, Poland
Old 08-19-2006 , 12:50   Auto Remove Password ( auto_remove_pass )
Reply With Quote #1

Description
* This plugin will execute defined comamnds on server if it's empty for some time. By default it was used as only password remover, but it was extended to handle execution of extra commands (like executing some config)
* So if someone got a server for rent and the clan after war forget to execute some basic commands - here you got this plugin.

Detailes description
Usage:
- open file addons\amx\config\amx.cfg (just an example)
- add these lines to amx.cfg only if you don't like defaults:
arp_checkdelay <delay>
arp_checktimes <number of checks>
arp_command <string>
arp_setpass <string>
- save the changes to file amx.cfg

CVAR explanation
arp_checkdelay <X> - delay in seconds (replace <X> with seconds) between each check (default is 60 seconds)
arp_checktimes <X> - (replace <X> with number) number of checks before plugin removes password from the server (default is 5 checks)
If you leave defaults (you don't add any lines to admin.cfg) then the plugin will remove the password from the server after 5 minutes (60 seconds * 5 = 300 seconds = 5 minutes).
arp_command <string> - execute the extra command (replace <string> with commands set without quotes) after the time (after setting/clearing sv_password)
arp_setpass <string> - (replace <string> with password set without quotes) set the given sv_password to the string value, set to arp_setpass "" to clear the password
arp_bots <X> - the number <X> can be
1 treat bots as real players, the HLTV is also
0 - do not reat bots as real players (default)

Example 1 (basic setting pass)
Put to amxx.cfg
Code:
arp_checkdelay 30
arp_checktimes 3
arp_setpass "some_server_password"
Example 2 (basic clearing pass)
Put to amxx.cfg
Code:
arp_checkdelay 30
arp_checktimes 3
arp_setpass "";// clearing pass
Example 2 (executing additional commands after setting pass)
Put to amxx.cfg
Code:
arp_checkdelay 30
arp_checktimes 3
arp_setpass "for_rent" ; // clear sv_password in this way
arp_command "exec server.cfg;amx_matchstop" ;
Example 3 (executing a config):
Put to amxx.cfg
Code:
arp_checkdelay 30
arp_checktimes 3
arp_command "exec clear_server.cfg"
arp_setpass "" ; // clear sv_password in this way
and in cstrtike\clear_server.cfg you place some commands you want to execute:
Code:
writeip
writeid
servercfgfile server.cfg
mapcyclefile mapcycyle.txt
say Defaults Loaded
exec server.cfg
changelevel de_dust
Extra
Originally made by Marach for AMX Mod (it was only clearing password)
(c) Copyright 2003 by Marach ([email protected], ICQ: 242122535, AIM: marach24, MSN IM: [email protected])

This file is provided as is (no warranties).
version 1.2 by _KaszpiR_ http://nvt.prv.pl
Attached Files
File Type: sma Get Plugin or Get Source (auto_remove_pass.sma - 1406 views - 4.6 KB)
__________________
= Ave Cesar, morituri Te salutant. = http://nvt.prv.pl = http://hlds.pl/
_KaszpiR_ is offline