LielXD / CS2-WeaponPaints-Website

Some website i've made for my cs2 server for the plugin cs2-weaponpaints and wanted to share this with the community.
https://cs2.lielxd.com
MIT License
51 stars 15 forks source link

Help #67

Open Carloscb22 opened 4 months ago

Carloscb22 commented 4 months ago

Help, I don't have any skin How can I fix it?

My website: Captura de pantalla 2024-04-20 041947

Website LielXD: Captura de pantalla 2024-04-20 041937

Carloscb22 commented 4 months ago

my config.php

<?php

// Choose your translate file name located in translation/filename.json
// You can add your own translation.
$Website_Translate = 'en';

// If you store your website on a subfolder domain,
// Leave empty if using the domain as normal.
// Example: cs2.lielxd.com/cs2/ | then we need here cs2 ↓
$Website_Subfolder = 'cs2';

// Place here your domain if steam authorize not working properly,
// if its working good then leave it empty.
$Website_Domain = '';

// Enable this if you want categories else it will display all weapons.
$Website_UseCategories = true;

// You can choose your own theme color
// false/empty - will use the default color.
// any html acceptable color - will display that color.
// true - this will make get a random color.
$Website_MainColor = true;

// Select which settings you want in the menu.
$Website_Settings = [
    'language' => true,  // user can select his own language.
    'theme' => true      // user can change his own color theme.
];

// Write here your steam api key, get one from here: https://steamcommunity.com/dev/apikey.
$SteamAPI_KEY = '(my api_key)';

// Write here your database login details.
$DatabaseInfo = [
    'hostname' => 'localhost',
    'database' => '(my database)',
    'username' => '(my username)',
    'password' => '(my password)',
    'port' => '3306'
];
LielXD commented 4 months ago

check if your plugin generated the database tables first.

Carloscb22 commented 4 months ago

Hi, excuse me, I'm pretty new to all of this. How can I tell if the database table was created?

LielXD commented 4 months ago

if you have phpmyadmin then you can use it if not you can try heidisql, search it on google or youtube.

Carloscb22 commented 4 months ago

Didn't generate the table. It should be in therippe_probarcss

LielXD commented 4 months ago

then you need to make sure you run your server with the plugin loaded to the website to work...

Carloscb22 commented 4 months ago

Captura de pantalla 2024-04-20 173106 Captura de pantalla 2024-04-20 173219

It's very weird, the plugins is running in the game as well as on the server but it doesn't generate the tables for me.

LielXD commented 4 months ago

did you fill your database credentials in addons/counterstrikesharp/configs/WeaponPaints?

Carloscb22 commented 4 months ago

Yes, the same ones that config.php on the page.

Example:

WeaponPaints.json:

  "DatabaseHost": "localhost",
  "DatabasePort": 3306,
  "DatabaseUser": "therippe_admin_Probando",
  "DatabasePassword": "Probando13%",
  "DatabaseName": "therippe_probarcs",

config.php:

$DatabaseInfo = [
    'hostname' => 'localhost',
    'database' => 'therippe_probarcs',
    'username' => 'therippe_admin_Probando',
    'password' => 'Probando13%',
    'port' => '3306'
Carloscb22 commented 4 months ago

The rest of the Config configuration looks like this:

// Choose your translate file name located in translation/filename.json
// You can add your own translation.
$Website_Translate = 'en';

// If you store your website on a subfolder domain,
// Leave empty if using the domain as normal.
// Example: cs2.lielxd.com/cs2/ | then we need here cs2 ↓
$Website_Subfolder = 'cs2';

// Place here your domain if steam authorize not working properly,
// if its working good then leave it empty.
$Website_Domain = '';

// Enable this if you want categories else it will display all weapons.
$Website_UseCategories = true;

// You can choose your own theme color
// false/empty - will use the default color.
// any html acceptable color - will display that color.
// true - this will make get a random color.
$Website_MainColor = true;

// Select which settings you want in the menu.
$Website_Settings = [
    'language' => true,  // user can select his own language.
    'theme' => true      // user can change his own color theme.
];
LielXD commented 4 months ago

Well you have something that blocks the plugin from creating the tables.

LielXD commented 4 months ago

And it is better if you delete your credentials from here because it's public and everyone can see it.

Carloscb22 commented 4 months ago

Thank you very much for the advice, but the credentials in the comment are exemplary not real

Carloscb22 commented 4 months ago
17:57:03 [EROR] (plugin:WeaponPaints) Unable to connect to database: Access denied for user 'therippe_admin_Example'@'localhost' (using password: YES)
An error occurred: Access denied for user 'therippe_admin_Example'@'localhost' (using password: YES)
SteamNetworkingSockets lock held for 5.2ms.  (Performance warning.)  ServiceThread,CSteamNetworkConnectionBase::Think,SNP_SendPacket,SendUDPacket
This is usually a symptom of a general performance problem such as thread starvation.

That error throws the server console at me

Is it correct to place localhost in hostname?

LielXD commented 4 months ago

Is your server and website on the same host/machine?

Check if your dB credentials are correct.

Carloscb22 commented 4 months ago

No, they are not in the same host/machine

Carloscb22 commented 4 months ago

Captura de pantalla 2024-04-20 182113 This way it appears on the host of the page.

But I have contracted the server cs2 on a different host than the page

LielXD commented 4 months ago

Write at the weaponpaints.json In the host set it to your database host ip address.

Carloscb22 commented 4 months ago

like this?

Example: WeaponPaints.json

  "DatabaseHost": "localhost",
  "DatabasePort": 3306,
  "DatabaseUser": "therip_ejemplo1",
  "DatabasePassword": "Ejem22%",
  "DatabaseName": "therip_ejem",

config.php

    'hostname' => '38.232.207.204',
    'database' => 'therip_ejem',
    'username' => 'therip_ejemplo1',
    'password' => 'Ejem22%',
    'port' => '3306'

Assuming '38.232.207.204' is the IP of the web

LielXD commented 4 months ago

And in your plug-in as well

And again please remove it from here as it's public and everyone can see your credentials.

Carloscb22 commented 4 months ago

Are Example Credentials Don't Place My Real Credentials

Perfect, then in both you should put the host/web IP

I'm trying it right now

Carloscb22 commented 4 months ago

| | | || || || || || | | || || _ || | | | | || || | | || || || || || || || || || || || || || | | || || || ____| | || | | || || || | | || || || || || | | | | | | |__ | || || || || || || || || || | | | | | |____ | | _ || | | || | | || | | || | | _ || | | | | | | | ___| | || |||__||| |__||| |____||| |||| || |||| || || || |___|

Version: 2.4b GitHub: https://github.com/Nereziel/cs2-WeaponPaints

00:23:43 [INFO] (plugin:WeaponPaints) Plugin is up to date

00:23:58 [EROR] (plugin:WeaponPaints) Unable to connect to database: Connect Timeout expired.