搜索
查看: 2047|回复: 3

求助!请进来看下。十分的感谢您

[复制链接]
发表于 2004-7-15 20:23:23 | 显示全部楼层 |阅读模式 来自 辽宁阜新
我的CS是1.5的。

  想问一下,amx_sounds.sma 这个插件脚本,怎么设置成我放音乐,其他人都听的到啊?就是我自定义的声音文件,谁来我的服务器就下载了,之后我播放音乐,谁都听的到。
#include <amxmod>
#include <amxmisc>

new bool:cuss = true

new Float:SndFreq1[33]

public plugin_init(){
   register_concmd("amx_cuss", "admin_cuss",ADMIN_LEVEL_B,": Turns cuss filter on and off")
   register_clcmd("say", "HandleSay")
   register_cvar("amx_nocuss","1")
   set_task(1.0,"delay_cuss")
   return PLUGIN_CONTINUE
}

public delay_cuss(){
   if(get_cvar_num("amx_nocuss") == 0)
      cuss = true
   else
      cuss = false
   return PLUGIN_CONTINUE
}

public client_connect(id){
   SndFreq1[id] = 0.0
   return PLUGIN_CONTINUE
}

public client_disconnect(id) {
   SndFreq1[id] = 0.0
   return PLUGIN_CONTINUE
}

QuotaCheck(User[], UserIndex){
   if (!(get_user_flags(UserIndex)&ADMIN_USER)){
      new Float:CurTime = get_gametime()
      if (CurTime <= SndFreq1[UserIndex] + 3.0){
         get_user_name(UserIndex,User,32)
         client_print(UserIndex,print_chat,"[AMX] Sounds are fun, but not if you use them too fast, %s",User)
         SndFreq1[UserIndex] = CurTime
         return 1
      }
      SndFreq1[UserIndex] = CurTime
   }
   return 0
}

public admin_cuss(id,level,cid) {
   if (!cmd_access(id,level,cid,1))
      return PLUGIN_HANDLED

   if (cuss == true){
      cuss = false
   }else   {
      cuss = true
   }
   return PLUGIN_CONTINUE
}

playsoundall(ww[]){
   client_cmd(0,"play %s",ww)   
}

say(Text[])
{
   new bad = 0
   if(cuss == false){
      if ( (containi(Text, "ass") != -1) ||
       (containi(Text, "cunt") != -1) ||
       (containi(Text, "***") != -1) ||
       (containi(Text, "bastard") != -1) ||
       (containi(Text, "piss") != -1) ||
       (containi(Text, "fuc") != -1) ||
       (containi(Text, "suck") != -1) ||
       (containi(Text, "bitch") != -1) ||
       (containi(Text, "dam") != -1) ||
       (containi(Text, "fuk") != -1) ||
       (containi(Text, "stfu") != -1) ||
       (containi(Text, "***") != -1) ||
       (containi(Text, "fag") != -1) ){
         bad = 1
      }
   }

   if(bad==1){
      client_print(0,print_chat,"<Server>  PlaySound text has been censored.")
   }else{
      client_print(0,print_chat,Text)
   }
   bad=0
   return 0
}

public HandleSay(id)
{
   new Speech[192]
   new User[32]
   new Text[192]

   get_user_name(id,User,32)   
   read_args(Speech,192)
   remove_quotes(Speech)

   if (equali(Speech, "bud"))
   {
      if (!QuotaCheck(User, id))
      {
         format(Text, 192, "<PlaySound> %s :    %s", User, Speech)
         say(Text)
         new rand = random(3)
         switch(rand)
         {
            case 0:   playsoundall("misc\bud.wav")
            case 1: playsoundall("misc\weis.wav")
            case 2: playsoundall("misc\er.wav")
         }

还有个问题就是,最终幻想CS插件。装完后能在游戏中定时播放音乐,我将我做的声音文件将其覆盖后,就定时播放我做的音乐了。我看了那段脚本,不是很长。是怎么做的呢?
//***********************************************************SOUND PRECACHING**************************************************************
public plugin_precache() {
if (file_exists("sound/FFX/Intro.wav")) precache_sound("FFX/Intro.wav")
if (file_exists("sound/FFX/LevelUp.wav")) precache_sound("FFX/LevelUp.wav")
if (file_exists("sound/FFX/cast.wav")) precache_sound("FFX/cast.wav")
if (file_exists("sound/FFX/flee.wav")) precache_sound("FFX/flee.wav")
if (file_exists("sound/FFX/cure.wav")) precache_sound("FFX/cure.wav")
}

//*********************************************************SERVER NOTIFICATION*************************************************************
public servernotice(id) {
if (file_exists("sound/FFX/Intro.wav")) emit_sound(id, CHAN_AUTO, "FFX/Intro.wav", 0.8, ATTN_NORM, 0, PITCH_NORM)
set_hudmessage(200,200,200,-1.0,0.30,5,6.0,12.0,0.1,0.5,HMCHAN_NOTICE)
show_hudmessage(0, "This server is using Final Fantasy X plugin v0.4.2 by Z4KN4F31N!(type helpFF in the console(~)to get help")
发表于 2004-7-17 22:22:34 | 显示全部楼层 来自 广东广州
真是对不起,最近没有时间去研究。
回复

使用道具 举报

发表于 2004-7-18 10:13:38 | 显示全部楼层 来自 福建龙岩
CS1.5可以用play命令? :3:
回复

使用道具 举报

发表于 2004-10-21 22:58:39 | 显示全部楼层 来自 湖北武汉
zhangle你好
sound里面的声音文件都是很小的,如果换成某些音乐,就很大,别人在进服务器的时候就要下很长时间的啊,这似乎不太现实啊
具体的怎么改我也不知道,希望点通的朋友能介绍编码的基本知识,谢谢
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表