Hello! I'm trying to play a sound in a plugin. Literally just copied and pasted another of my working snippets and it doesn't do anything. This is what I did:
PHP Code:
new const g_szSound[1][FILELENGHT];
public plugin_precache()
{
amx_load_setting_string(SETTINGSFILE, "Invisibility Cloak", "SOUND", g_szSound[0], charsmax(g_szSound[]));
precache_sound(g_szSound[0]);
}
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_concmd("invisound", "PlaySound", ADMIN_SLAY);
}
public PlaySound(id)
{
emit_sound(id, CHAN_BODY, g_szSound[0], 1.0, ATTN_NORM, 0, PITCH_NORM);
}
Suggestions? The sound is 2 seconds length and it's a wav converted from mp3