# adityaambre/amxx-plugins architecture

> Architecture diagram of the GitHub repository adityaambre/amxx-plugins, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adityaambre/amxx-plugins
- Repository: https://github.com/adityaambre/amxx-plugins

## Overview

##### Project type and purpose
- This is an AMX Mod X plugin (“xvskins.sma” → “xvskins.amxx”) for Counter-Strike 1.6 that dynamically swaps player models (“skins”) based on admin/VIP access flags.
- It is not a traditional web or microservice app but a game-server plugin extending the core AMX Mod X host.

##### File structure
- Top-level:
- cstrike/ – your local CS game folder root
– addons/amxmodx/scripting/xvskins.sma (source script)
– addons/amxmodx/configs/plugins.ini (plugin enablement)
- You compile xvskins.sma into xvskins.amxx under the “compiled” folder, then drop it into addons/amxmodx/plugins.
- Models (skins) live under cstrike/models/player… directories per role.

##### README for additional insights
- Dependencies: Counter-Strike 1.6, AMX Mod X, custom player model .mdl files.
- Workflow: compile script → copy to plugins → enable in plugins.ini → create per-role model folders → launch server.

##### Elements
- CS Client
- CS Server
- AMX Mod X Core
- XV Skins Plugin
- File System (configs + models)
- Client → Server (game traffic)
- Server → Core (module load)
- Core → Plugin (load & event dispatch)
- Plugin → File System (read models/config)
- Plugin → Server → Client (apply model)
- Runtime components (Core/Plugin): another

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Network Components
    Client["CS Client"]:::network
    Server["CS Server"]:::network

    %% Runtime Components
    Core["AMX Mod X Core"]:::runtime
    Plugin["XV Skins Plugin"]:::runtime

    %% Storage Components
    subgraph "File System"
        Configs["plugins.ini"]:::storage
        ScriptSource["xvskins.sma"]:::storage
        Models["models/[role]/*.mdl"]:::storage
        Docs["README.md"]:::storage
        License["LICENSE"]:::storage
    end

    %% Data and Control Flow
    Client -->|"game traffic"| Server
    Server -->|"loads module"| Core
    Core -->|"reads configs"| Configs
    Core -->|"loads plugin"| Plugin
    Core -->|"OnClientConnect/event"| Plugin
    Plugin -->|"reads script source"| ScriptSource
    Plugin -->|"reads models assets"| Models
    Plugin -->|"ApplySkin() -> server"| Server
    Server -->|"update skin"| Client

    %% Click Events
    click Core "https://github.com/adityaambre/amxx-plugins/tree/master/cstrike/addons/amxmodx"
    click Configs "https://github.com/adityaambre/amxx-plugins/blob/master/cstrike/addons/amxmodx/configs/plugins.ini"
    click ScriptSource "https://github.com/adityaambre/amxx-plugins/blob/master/cstrike/addons/amxmodx/scripting/xvskins.sma"
    click Docs "https://github.com/adityaambre/amxx-plugins/blob/master/README.md"
    click License "https://github.com/adityaambre/amxx-plugins/tree/master/LICENSE"

    %% Styles
    classDef network fill:#D6EAF8,stroke:#3498DB,color:#154360
    classDef runtime fill:#D5F5E3,stroke:#28B463,color:#1D8348
    classDef storage fill:#FCF3CF,stroke:#F4D03F,color:#7D6608
```
