- Gloves?

Currently only in plugin, website update soon
This commit is contained in:
Dawid Bepierszcz
2024-02-19 13:56:55 +01:00
parent bbbf27a751
commit a37f4e9e58
92 changed files with 370 additions and 153 deletions

View File

@@ -49,12 +49,18 @@ namespace WeaponPaints
`weapon_paint_id` int(6) NOT NULL,
`weapon_wear` float NOT NULL DEFAULT 0.000001,
`weapon_seed` int(16) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci",
) ENGINE=InnoDB",
@"CREATE TABLE IF NOT EXISTS `wp_player_knife` (
`steamid` varchar(64) NOT NULL,
`knife` varchar(64) NOT NULL,
UNIQUE (`steamid`)
) ENGINE = InnoDB"
) ENGINE = InnoDB",
@"CREATE TABLE IF NOT EXISTS `wp_player_gloves` (
`steamid` varchar(64) NOT NULL,
`weapon_defindex` int(11) NOT NULL,
`paint` int(11) NOT NULL,
UNIQUE (`steamid`)
) ENGINE=InnoDB"
};
foreach (var query in createTableQueries)
@@ -98,6 +104,20 @@ namespace WeaponPaints
}
}
internal static void LoadGlovesFromFile(string filePath)
{
try
{
string json = File.ReadAllText(filePath);
var deserializedSkins = JsonConvert.DeserializeObject<List<JObject>>(json);
WeaponPaints.glovesList = deserializedSkins ?? new List<JObject>();
}
catch (FileNotFoundException)
{
throw;
}
}
internal static void Log(string message)
{
Console.BackgroundColor = ConsoleColor.DarkGray;