Compare commits

...

4 Commits

Author SHA1 Message Date
Nereziel
760429e644 Merge pull request #54 from daffyyyy/update-readme-1
Update README.md
2023-11-19 22:36:28 +01:00
Dawid Bepierszcz
304d8501cc Update README.md 2023-11-19 22:25:38 +01:00
Nereziel
e9f7db5171 Merge pull request #51 from daffyyyy/website-fix-1
Fixed blank page
2023-11-19 21:14:15 +01:00
Dawid Bepierszcz
648b928b4e Update index.php 2023-11-19 21:10:55 +01:00
2 changed files with 43 additions and 4 deletions

View File

@@ -21,9 +21,50 @@ There will be a lot of frequent changes which may break functionality or compati
### CS2 server: ### CS2 server:
- compile and copy plugin to plugins. Info here [https://docs.cssharp.dev/guides/hello-world-plugin/](https://docs.cssharp.dev/guides/hello-world-plugin/) - compile and copy plugin to plugins. Info here [https://docs.cssharp.dev/guides/hello-world-plugin/](https://docs.cssharp.dev/guides/hello-world-plugin/)
- setup `addons/counterstrikesharp/configs/plugins/WeaponPaints/WeaponPaints.json` - setup `addons/counterstrikesharp/configs/plugins/WeaponPaints/WeaponPaints.json`
set `GlobalShare` to true for gloval, or include database credentials set `GlobalShare` to true for global, or include database credentials
- in `addons/counterstrikesharp/configs/core.json` set **FollowCS2ServerGuidelines** to **false** - in `addons/counterstrikesharp/configs/core.json` set **FollowCS2ServerGuidelines** to **false**
### Plugin configuration:
<details>
<summary>Spoiler warning</summary>
<code><pre>{
"Version": 4, // Don't touch
"DatabaseHost": "", // MySQL host (required if GlobalShare = false)
"DatabasePort": 3306, // MySQL port (required if GlobalShare = false)
"DatabaseUser": "", // MySQL username (required if GlobalShare = false)
"DatabasePassword": "", // MySQL user password (required if GlobalShare = false)
"DatabaseName": "", // MySQL database name (required if GlobalShare = false)
"GlobalShare": false, // Enable or disable GlobalShare, plugin can work without mysql credentials but with shared website at weaponpaints.fun
"CmdRefreshCooldownSeconds": 60, // Cooldown time in refreshing skins (!wp command)
"Prefix": "[WeaponPaints]", // Prefix every chat message
"Website": "example.com/skins", // Website used in WebsiteMessageCommand (!ws command)
"Messages": {
"WebsiteMessageCommand": "Visit {WEBSITE} where you can change skins.", // Information about website where player can change skins (!ws command) Set to empty to disable
"SynchronizeMessageCommand": "Type !wp to synchronize chosen skins.", // Information about skins refreshing (!ws command) Set to empty to disable
"KnifeMessageCommand": "Type !knife to open knife menu.", // Information about knife menu (!ws command) Set to empty to disable
"CooldownRefreshCommand": "You can\u0027t refresh weapon paints right now.", // Cooldown information (!wp command) Set to empty to disable
"SuccessRefreshCommand": "Refreshing weapon paints.", // Information about refreshing skins (!wp command) Set to empty to disable
"ChosenKnifeMenu": "You have chosen {KNIFE} as your knife.", // Information about choosen knife (!knife command) Set to empty to disable
"ChosenKnifeMenuKill": "To correctly apply skin for knife, you need to type !kill.", // Information about suicide after knife selection (!knife command) Set to empty to disable
"KnifeMenuTitle": "Knife Menu." // Menu title (!knife menu)
},
"Additional": {
"SkinVisibilityFix": true, // Enable or disable fix for skin visibility
"KnifeEnabled": true, // Enable or disable knife feature
"SkinEnabled": true, // Enable or disable skin feature
"CommandWpEnabled": true, // Enable or disable refreshing command
"CommandKillEnabled": true, // Enable or disable kill command
"CommandKnife": "knife", // Name of knife menu command, u can change to for e.g, knives
"CommandSkin": "ws", // Name of skin information command, u can change to for e.g, skins
"CommandRefresh": "wp", // Name of skin refreshing command, u can change to for e.g, refreshskins
"CommandKill": "kill", // Name of kill command, u can change to for e.g, suicide
"GiveRandomKnife": false // Give random knife to players if they didn't choose
},
"ConfigVersion": 4 // Don't touch
}</pre></code>
</details>
### Web install: ### Web install:
- not needed if config `GlobalShare = true` - not needed if config `GlobalShare = true`
- requires PHP min v7.3 (tested on php ver `8.2.3` and nginx webserver) - requires PHP min v7.3 (tested on php ver `8.2.3` and nginx webserver)

View File

@@ -7,9 +7,7 @@ require_once 'class/utils.php';
$db = new DataBase(); $db = new DataBase();
if (isset($_SESSION['steamid'])) { if (isset($_SESSION['steamid'])) {
$steamid = $_SESSION['steamid'];
include('steamauth/userInfo.php');
$steamid = $steamprofile['steamid'];
$weapons = UtilsClass::getWeaponsFromArray(); $weapons = UtilsClass::getWeaponsFromArray();
$skins = UtilsClass::skinsFromJson(); $skins = UtilsClass::skinsFromJson();