|
1 | | -# CS2--DemoRecoder |
| 1 | +# CS2--DemoRecoder |
| 2 | + |
| 3 | +### Requirements |
| 4 | +* [CounterStrikeSharp](https://github.com/roflmuffin/CounterStrikeSharp/) (version 142 or higher) |
| 5 | + |
| 6 | +### Installation |
| 7 | + |
| 8 | +Drag and drop from [releases](https://github.com/sapsanDev/CS2--DemoRecoder/releases) to game/csgo/addons/counterstrikesharp/plugins |
| 9 | + |
| 10 | +### Configuration |
| 11 | +Configure the file DemoRecorder.json generated on addons/counterstrikesharp/configs/plugins/DemoRecorder |
| 12 | +```json |
| 13 | +{ |
| 14 | + "MinOnline": 4, |
| 15 | + "ServerId": 1, |
| 16 | + "DemosDir": "demos/", |
| 17 | + "Token": "your_web_app_token", |
| 18 | + "UploadUrl": "http://example.com:2053/upload" |
| 19 | +} |
| 20 | +``` |
| 21 | +* MinOnline - 4: Minimum online requirement to start recording a demo. |
| 22 | +* ServerId - 1: Unique server ID. |
| 23 | +* DemosDir - "demos/": The folder for recording the demo on the server is created along the path addons/counterstrikesharp/data/ |
| 24 | +* Token - "your_web_app_token": Your WEB token for uploading demo to the site. |
| 25 | +* TeleportTicks - "http://example.com:2053/upload": Demo download handler address. |
| 26 | + |
| 27 | +### Commands |
| 28 | +* css_dr_reload - Reload config DemoRecorder.json. Access @css/root |
| 29 | + |
| 30 | +# Web-Server |
| 31 | + |
| 32 | +### Requirements |
| 33 | +* [NodeJS](https://nodejs.org/en) (version 17.9.0 or higher) |
| 34 | +* [npm](https://www.npmjs.com/) (version 8.19.2 or higher) |
| 35 | +* [pm2](https://pm2.keymetrics.io/) (version 5.1.2 or higher) |
| 36 | + |
| 37 | +### Configuration |
| 38 | +Configure the file Config.json |
| 39 | +```json |
| 40 | +{ |
| 41 | + "ssl": false, |
| 42 | + "sslCert": "", |
| 43 | + "sslKey": "", |
| 44 | + "port": "2053", |
| 45 | + "database": { |
| 46 | + "host": "localhost", |
| 47 | + "user": "db_user", |
| 48 | + "port": "3306", |
| 49 | + "database": "db_name", |
| 50 | + "password": "pass" |
| 51 | + }, |
| 52 | + "token": "your_web_app_token", |
| 53 | + "demos": { |
| 54 | + "CleanType": "count", |
| 55 | + "DaysOrCount": 500, |
| 56 | + "TimeClear": 60, |
| 57 | + "UploadDir": "path_toupload_demos" |
| 58 | + } |
| 59 | +} |
| 60 | +``` |
| 61 | +* ssl - false: If you want to use ssl set true |
| 62 | +* sslCert - "": Path to the certificate file (need if ssl set true). |
| 63 | +* sslKey - "": Path to the certificate key file (need if ssl set true). |
| 64 | +* port - "2053": Web server launch port. |
| 65 | +* token - "your_web_app_token": Your WEB token for uploading demo. |
| 66 | +* CleanType - "count/time": Type of deletion of old demo recordings. count - Removal upon reaching quantity, time - Deletion upon reaching storage time. |
| 67 | +* DaysOrCount - 500: if CleanType = count the amount of demo storage is set, if CleanType = time the number of days for demo storage is set |
| 68 | +* UploadDir - "root/demos": Full demo storage path |
| 69 | + |
| 70 | +### Web Installation |
| 71 | +Upload the Web server files to the desired folder, in the console go to the folder with the Web files, enter the command "npm i" |
| 72 | + |
| 73 | +Launch commands |
| 74 | +* npm start - Start web server. |
| 75 | +* npm stop - Stop web server. |
| 76 | +* npm restart - Restart web server. |
0 commit comments