Oczywiście + będą
#include <amxmodx>
#define Maxsounds 20
#define DEBUG 0
new soundlist[Maxsounds][64]
new soundCount = 0
public plugin_init() {
register_plugin("Loading Music","0.9","Andrax2000")
return PLUGIN_CONTINUE
}
public plugin_precache() {
new dh
new nameFull[64], name[64], nameExt[32]
dh = open_dir("sound/misc/loading", nameFull, 63)
do
{
strtok(nameFull,name,63,nameExt,31,'.')
if (equali(nameExt, "mp3")) {
#if DEBUG==1
server_print("[AMXX LOADING MUSIC] Znaleziono %s ", nameFull)
#endif
soundlist[soundCount] = name
soundCount++
}
}
while(soundCount<Maxsounds && next_file(dh, nameFull, 63))
close_dir(dh)
server_print("[AMXX LOADING MUSIC] Znaleziono %i dziekow", soundCount)
for (new i = 0; i < soundCount; i++)
{
format(name, 63, "sound/misc/loading/%s.mp3",soundlist[i])
#if DEBUG==1
server_print("[AMXX LOADING MUSIC] Przechwytywanie %s ", name)
#endif
precache_generic(name)
}
return PLUGIN_CONTINUE
}
public client_connect(id) {
new i
i = random_num(0,soundCount-1)
client_cmd(id,"mp3 play sound/misc/loading/%s",soundlist[i])
return PLUGIN_CONTINUE
}
Użytkownik Pro Noob edytował ten post 08.01.2011 21:24


Dodatki SourceMod



Temat jest zamknięty








