a188 发表于 2008-4-17 17:16:08

求助声音插件-登陆服务器听歌插件-无法播放

代码是正确,可用的!不知道是这个 #include <amxmisc>  需要加载什么DLL吗?

求解答,谢谢大家


代码如下:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#define MAX_SONGS 50

public plugin_init(){
register_plugin("loading with music","2.0","eFrigid")
}

new configsdir
new configfile
new song
new songdir
new bool:precached

public plugin_precache(){
get_configsdir(configsdir,199)
format(configfile,199,"%s/loadingsongs.ini",configsdir)
new trash
for(new i=0;i<MAX_SONGS;i++)
{
precached=false
read_file(configfile,i,song,63,trash)
if(!equali(song,""))
{
precached=true
format(songdir,63,"sound/misc/%s",song)
precache_generic(songdir)
}
}
}

public client_connect(id){
set_task(0.2,"delay_play",id) // delay play, fixed saometime can't play problem
return PLUGIN_CONTINUE
}

public delay_play(id) {
new size = file_size(configfile,1)
new rsong = random_num(0,size-1)
new cursong, a
read_file(configfile,rsong,cursong,63,a)
//client_cmd(id,"mp3 play sound/misc/%s",cursong)
client_cmd(id,"mp3 loop sound/misc/%s",cursong) // loop play, fixed sometime load too long and sound stoped
}


谢谢大家。。。请解答:burn:

a188 发表于 2008-4-17 23:15:32

回复: 求助声音插件-登陆服务器听歌插件-无法播放

顶上!盼解答!
:burn:

OMG 发表于 2008-4-23 23:43:07

回复: 求助声音插件-登陆服务器听歌插件-无法播放

Post by a188
代码是正确,可用的!不知道是这个 #include <amxmisc>  需要加载什么DLL吗?

求解答,谢谢大家


代码如下:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#define MAX_SONGS 50

public plugin_init(){
register_plugin("loading with music","2.0","eFrigid")
}

new con...

我的也一样,
请求会弄的帮助,谢谢!

blueskyts 发表于 2010-5-16 16:04:52

帮顶,同样的问题

blueskyts 发表于 2010-5-22 12:17:53

我的已经解决,路径问题吧,改下音乐源就好了
页: [1]
查看完整版本: 求助声音插件-登陆服务器听歌插件-无法播放