## Features
### Dual Display Methods
- **HUD Messages**:
- Displayed on players' screens in configurable colors
- RGB color customization for each message
- Central positioning for maximum visibility
### Chat Messages
- **Colored Chat**:
- Supports various color codes for vibrant, eye-catching messages
- Uses the cromchat.inc library for reliable colored text
### Smart Scheduling
- **Independent Cycling**:
- Separate cycles for HUD and chat messages
- Configurable interval between advertisements
- Automatic cycling through all messages
### Easy Configuration
- **Simple INI Format**:
- Clear section-based organization
- Auto-creation of default config if none exists
- Comments supported for better organization
## Installation
1. **Prerequisites**:
- AMX Mod X installed on your CS 1.6 server
- cromchat.inc include file in your includes directory
2. **Compile the Plugin**:
- Use AMX Mod X compiler to compile `ads.sma`
3. **Install Required Files**:
- Copy `ads.amxx` to your `plugins` folder
- Add `ads.amxx` to your `plugins.ini` file
- Restart your server or change map to load the plugin
## Configuration
### INI File Format
The plugin uses auto generate to create the `addons/amxmodx/configs/advertising.ini` with two main sections:
```
[HUD ADVERTISING]
"255 0 0" This is a cool red hud message !
"0 0 255" This is a cool blue hud message !
"0 255 0" Visit us at https://gamemods-servers.com <3 !
[CHAT ADVERTISING]
&x04This is chat &x07message !
&x03This is another chat &x04message !
&x04Super long message &x07for chat !
```
### HUD Message Format
HUD messages support RGB color customization:
- Format: `"R G B" Your message here`
- Example: `"255 0 0" This is a red message!` (displays in red)
- Default color is white if no RGB values are provided
### Chat Message Format
Chat messages support color codes using cromchat formatting:
- `&x01` to `&x08` - Various colors (depends on cromchat implementation)
- Example: `&x04This is green &x03and this is team color!`
### Customization
- Modify `adv_interval` cvar to change the interval between advertisements (default: 15 seconds)
- Edit the INI file to add, remove, or modify advertisements
## Console Variables (CVars)
- `adv_interval` - Sets the interval between advertisements in seconds (default: 15.0)
## Troubleshooting
### Common Issues
- If ads don't appear, check that the plugin is loaded properly in plugins.ini
- Verify the advertising.ini file exists in the configs directory
- Make sure cromchat.inc is properly installed
### Configuration Problems
- Check for syntax errors in your advertising.ini file
- Ensure both [HUD ADVERTISING] and [CHAT ADVERTISING] sections exist
- Verify RGB values are properly formatted with quotes
## Example Use Cases
### Server Rules
```
[HUD ADVERTISING]
"255 255 0" No camping in spawn areas!
"255 0 0" Cheating will result in permanent ban!
[CHAT ADVERTISING]
&x04Team-killing is not allowed on this server!
```
### Community Promotion
```
[HUD ADVERTISING]
"0 255 255" Join our Discord: discord.gg/yourserver
"0 255 0" Visit our website: yourwebsite.com
[CHAT ADVERTISING]
&x04Vote for our server at &x03topservers.com/vote/yourserver
```
### Special Events
```
[HUD ADVERTISING]
"255 0 255" Double XP weekend this Saturday!
"255 128 0" Knife competition Sunday at 8PM!
[CHAT ADVERTISING]
&x04Join our tournament next week! &x03Register at yourwebsite.com/tournament
```
## Advanced Usage
### Message Formatting Tips
- Keep HUD messages short and to the point
- Use bright colors for important information
- Mix colors in chat messages to highlight key information
- Add regular updates to your ads to keep them fresh
### Performance Considerations
- Too many advertisements may annoy players
- Recommend 5-10 second visibility for HUD messages
- Space out chat messages to avoid spamming
## Credits
- Uses cromchat.inc for colored chat support
- Developed for AMX Mod X
---
*This plugin is designed to work with AMX Mod X for Counter-Strike 1.6. Make sure to use compatible versions of all dependencies.*