Quote:
Originally Posted by PepsiSexy
Hello. Currently im using this simple loadingsound Plugin but i want that you can put in 3 Sounds and 1 is randomly playing if you connect. could someone do it for me please? please do it so that i can use .mp3 files. But .wav is also good. Mp3 or Wav? What is better, please use the better way. Thank you in advance
PHP Code:
#include <amxmodx>
public plugin_precache() {
precache_sound("misc/myfile.mp3")
return PLUGIN_CONTINUE
}
public client_connect(id) {
client_cmd(id,"mp3 play sound/misc/myfile.mp3")
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("Loadingsound","1.0","Lambo")
return PLUGIN_CONTINUE
}
|
it works 100 % i use this always.
PHP Code:
#include <amxmodx>
#define Maxsounds 6
new soundlist[Maxsounds][] = {"Half-Life01","Half-Life02","Half-Life04","Half-Life12","Half-Life13","Half-Life17"}
public plugin_init() {
register_plugin("Loading_Sound","1.0","AUTHOR")
return PLUGIN_CONTINUE
}
public client_connect(id) {
new i
i = random_num(0,Maxsounds-1)
client_cmd(id,"mp3 play media/%s",soundlist[i])
return PLUGIN_CONTINUE
}
__________________