First, you shouldn't precache mp3 files with precache_sound.
You must use precache_generic.
If you want to know how to do it, this is the right section. But if you want someone to do it for you, you must start the thread in the "Suggestions / Requests" section.
Code:
#include <amxmodx>
new const mp3array[][] = {
"sound/misc/myfile.mp3",
"sound/misc/myfile2.mp3",
"sound/misc/myfile3.mp3"
}
public plugin_precache() {
for(new i; i<sizeof(mp3array); i++) {
precache_generic(mp3array[i])
}
}
public client_connect(id) {
client_cmd(id,"mp3 play ^"%s^"",mp3array[ random( sizeof(mp3array) ) ] )
}
public plugin_init() {
register_plugin("Loadingsound","1.0","Lambo")
}