Battlefield Play4Free weapon limiter script
Battlefield Play4Free limiter script based on bfp4f-rcon class.
- PHP Interpreter
- Database (Script supports 2 types of DB)
- MySQL, PostgreSQL or other database possible to connect via PDO.
- ... or MongoDB (You need to install ext-mongo for PHP)
- Webserver (if you would like to run it continuously via web-browser instead of running in console/cmd/terminal)
You may install bfp4f-limiter in two different ways. With Composer (package dependency manager for php) or just manually.
Installtion guide was made for Windows OS. It may be also reproduced on LAMP or MAMP easily. If you have installed or you owned already webserver with php you may skip first 2 steps.
- Download EasyPHP (php development) or other webserver with php interperter and mysql database (googlit: wamp php mysql).
- Install it.
- Download bfp4f-rcon ("Download .zip" button on right sidebar). Extract it.
- Download bfp4f-limiter from stable branch ("Download .zip" button on right sidebar). Extract it.
- Merge it to one folder.
├── composer.json ├── DB-mongo.php ├── DB-pdosql.php ├── limiter-browser.php ├── limiter-config.php ├── limiter-console.php ├── limiter-script.php ├── limiter.sql ├── loop-limiter.sh └── src └── T4G └── BFP4F └── Rcon ├── Base.php ├── Chat.php ├── Players.php ├── Server.php ├── Stats.php └── Support.php
- Open limiter-config.php in your text/code editor.
- Comment (add two slashes
//) at the beginnig of the line 29
- Uncomment (delete two slashes) on lines 31-35.
- Configure connection to database on lines 39-45. Password is supposed to be empty as default on many WAMPs. If you are sure (googlit) you don't have password to your mysql database leave
""as no password.
- Configure RCON conection
- Open phpmyadmin (look for it in easyphp's tray menu).
- Create new database called "limiter".
- Enter this database.
- Import "limiter.sql" (Tab called import > upload .sql).
- Move this directory to your
- Start Apache and MySQL services .
- Run it in browser typing
Installation finished. Now look up for configuration.
limiter-config.php you have very long list what you could change and configure it as you prefer.
Please notice that mm_iga/mm_kicker has usually predefined default kick message (usually it is
piqus you are being kicked (reason: Unknown)). Each kick message in
limiter-config.php will only replace word Unknown.
You may run script continously running via browser or terminal. There are some webhostings which allows to run CRON script minutely, also this method is supported and recomended.
Running via browser. If you installed completely limiter script you may type in address bar http://localhost/path/to/limiter-browser.php
Running via console is much easier if you have ever used it to run php scripts. If you have exported to
$PATH (System Env. Variable) location to your php(.exe) binary you may enter folder where you have installed limiter then execute
php limiter-console.php or
sh loop-limiter.sh in terminal/console/cmd.exe/powershell. You don't have to export this variable. You could just type "global" path to php(.exe) i.e
It is worth noting that
sh command is not supported out of the box in Windows OS. You could install GIT Bash (Mingw) form http://git-scm.com/ which includes many useful commands like
ssh over openssh,
git etc. etc.
Project has been added to Packagist. You may invoke
composer create-project piqus/bfp4f-limiter:dev-stable
Feel free to modify code. Each patch is moderated so don't be shy and share your idea! ;-)