CS连线服务器时播放音乐

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS个性化修改专区CS连线服务器时播放音乐
发帖 回复
正序阅读 最近浏览的帖子最近浏览的版块
1个回复

CS连线服务器时播放音乐

楼层直达
a5204653

ZxID:7495339

等级: 上尉
举报 只看楼主 使用道具 楼主   发表于: 2009-08-09 0
cstrike\sound\misc    歌曲目录cstrike\addons\amxmodx\configs/LoadingSong.ini 歌曲菜单
/*Loading Song Advanced: Supports,
*|  \/  | _ \__ /
*| |\/| |  _/|_ \ Files
*|_|  |_|_| |___/
*v2.0:
*the random play issue.
*
*-------------------------------------------------------------------------------------
*
*v1.1:
*Found a little bug in 1.0.
*-------------------------------------------------------------------------------------
*Credit:
*[OSA]Odin For his original version
*twistedeuphoria For helping fix the random play issue.
*
*Difference from [OSA]Odin's
*Instead of having to edit a code everytime you want to add a song this version includes an ini file(loadingsongs.ini) to add your mp3's. You can add up to 50 mp3's of your choice
*[NOTE]Adding 4 full mp3's is a very long download![/NOTE]
*
*mp3's
*If your wondering where to put these. They go in your sound/misc Folder
*
*loadingsongs.ini
*Add your mp3's name
*ie:
*
*eazye.mp3
*
*If the mp3 you put in your misc folder was named "eazye.mp3"
*
*Soon to come:
*
*Making it support wav
*
*
*Installation:
*
*Place sma file in "Scripting" folder.(compile if needed)
*
*Place amxx file in "Plugins" folder(If you compiled yourself get amxx file out of "Compiled" folder located in the scripting folder.
*
*Go in "Configs" folder add the loadingsounds.ini file.
*
*Add your mp3's name in "loadingsongs.ini" file
*
*Last but not least edit your "plugins.ini" file located in your "Configs" folder add loadingsongadvanced.amxx in your third party custom plugins.
*/
#include <amxmodx>
#include <amxmisc>
#define MAX_SONGS 50
public plugin_init() {
register_plugin("loading with music","2.0","eFrigid")
return PLUGIN_CONTINUE
}
new configsdir[200]
new configfile[200]
new song[MAX_SONGS][64]
new songdir[MAX_SONGS][64]
new bool:precached[MAX_SONGS]
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[4],""))
   {
   precached=true
   format(songdir,63,"misc/%s",song)
   precache_sound(songdir)
  }
}
}
public client_connect(id) {
new size = file_size(configfile,1)
new rsong = 0
new cursong[64] , a
while (equal(cursong[4],""))
{
  rsong = random_num(0,size-1)
  read_file(configfile,rsong,cursong,63,a)
}
client_cmd(id,"mp3 loop sound/misc/%s",cursong)

return PLUGIN_CONTINUE
}
附件: CS连线服务器时播放音乐.rar (5 K) 下载数:10
leeebady

ZxID:8422885

等级: *
举报 只看该作者 沙发   发表于: 2009-08-09 0
这- =是啥?
« 返回列表
发帖 回复