Garry's Mod

Garry's Mod

Not enough ratings
Image loader
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Comic, Fun, Scenic
File Size
Posted
Updated
8.340 KB
Aug 13 @ 11:50pm
Sep 6 @ 7:34pm
2 Change Notes ( view )

Subscribe to download
Image loader

Description
📦 Image Addon Description
=========================
This addon allows you to download and save images 🖼️ from the site via the API 🌐, automatically filtering them by tags 🏷️.
The user can view images 👀 through the built-in UI, skip ⏭️ or save 💾 the ones they like.
The addon also keeps tag statistics 📊 and allows you to get a rating of the most popular tags ⭐.

Main Features ✨
----------------
- Automatic image loading ⚡ from an external API 🌐
- Filtering images by tags 🏷️
- Displaying images in an interactive UI 🖥️
- Saving images locally 💾
- Tracking and saving image tags 📊 with popularity calculation 🌟
- Teamwork through console commands 💻 for uploading and managing images

Console Commands 🖥️
--------------------
ks_image
Starts the process of uploading a new image 📤 via the API
Usage example:
ks_image

ConVar-parameters ⚙️
--------------------
- ks_saveImageTags – enables/disables saving image tags 🏷️ (1 – enabled ✅, 0 – disabled ❌)
- ks_consoleMessage – enables/disables console messages 🖨️ when uploading images
- ks_enableImageUi – enables/disables the UI for viewing images 🖼️ (1 – enabled ✅, 0 – disabled ❌)

Addon Functions 🛠️
--------------------
- ReadFileToTable(pathToFile, gameDirectory)
📖 Reads a local file with tags and their frequency of use

- SaveImageTags(tableTags)
💾 Saves the tag table to a local file, updating the number of uses of each tag

- GettingRaitingList(raitingCount)
⭐ Returns a list of tags with the number of uses greater than or equal to raitingCount

- LoadingImage()
🔄 Checks for a catalog of images and loads a random image 🎲 via the API

- CreateLinkImage(count)
🔗 Generates a link to the image with the selected tags and makes an HTTP request 🌐 to the API

- DrawImageUI(imageLink, width, height, id, tags)
🖥️ Displays the uploaded image in the UI window with Save 💾 and Skip ⏭️ buttons

- WriteImage(imageLink, id, tags)
🖼️ Saves the image locally and updates the tag statistics 📊

GitHub-Link 🖥️
----------------
https://github.com/ksseniks/Hentai-Viewer-for-Garys-mod?tab=readme-ov-file