Turn on the atmosphere! Auto-play music when entering a CS 1.6 server
About this content
We are pleased to present a unique plugin "Musica Login Petare" for AMX Mod X — a solution that brings your CS 1.6 server to life with automatic playback of background music when a player connects.
🎵 The plugin selects a track depending on the map:
de_petare→ musica01.mp3de_dust2→ musica02.mp3de_inferno→ musica03.mp3de_nuke→ musica04.mp3
The server automatically sends MP3 files to players through the resource system — just configure sv_downloadurl, and the music will be downloaded upon the first visit.
🔧 How does it work?
- Files are stored in the folder
sound/pp3/ - When connecting — the player downloads the required track (if they don't already have it)
- After 3 seconds — playback begins
- Support for custom tracks and flexible configuration
🎨 Style: cyberpunk, neon, Venezuelan flair — everything you need to feel the spirit of Petare from the very first seconds of gameplay.
🛠️ Plugin created by m2mix & DDS with love for the community.
✅ Suitable for RP, DeathMatch, RolePlay, and themed servers.
📌 Tip: Share a link to the ZIP package with the music with your players — that way everyone will be on the same wavelength from their first visit!
👉 Want the same effect on your server? Install the plugin and create a truly immersive atmosphere!
#include <amxmisc>
// Configuration: path to the music (must be in the sound/ folder)
#define MUSIC_PATH "pp3/mymusic.mp3" // File will be at: sound/pp3/mymusic.mp3
enum _:enumMusic
{
nameMap[40],
nameMusic[120]
};
new g_music = 0;
// List of maps and music
new const STR_DATA[][enumMusic] =
{
{"de_petare", "pp3/musica01.mp3"},
{"de_dust2", "pp3/musica02.mp3"},
{"de_inferno", "pp3/musica03.mp3"},
{"de_nuke", "pp3/musica04.mp3"}
};
public plugin_init()
{
register_plugin("Musica Login Petare", "1.0", "m2mix & DDS");
// Регистрируем звук как ресурс — клиент скачает его автоматически
new soundPath[128];
formatex(soundPath, charsmax(soundPath), "sound/%s", MUSIC_PATH);
precache_generic(soundPath);
}
public client_connect(id)
{
// Откладываем проигрывание на 3 секунды — чтобы клиент успел загрузить
set_task(3.0, "play_music", id);
}
public play_music(taskid)
{
new id = taskid;
if (!is_user_connected(id)) return;
new szMap[32];
get_mapname(szMap, charsmax(szMap));
new musicFile[128];
for (new i = 0; i < sizeof(STR_DATA); i++)
{
if (equal(szMap, STR_DATA[i][nameMap]))
{
formatex(musicFile, charsmax(musicFile), "sound/%s", STR_DATA[i][nameMusic]);
client_cmd(id, "mp3 play ^"%s^"", musicFile);
break;
}
}
}

Comments (0)