广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 2031 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
grandc2000
数位造型
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[1.6][插件] 有关格式 sma

我将个 sma.档 放入compile  但转唔返amx档出黎 唔知边到出现左问题


红色=修改
roundsound_4

// * 回合结束播放歌曲 *
// 这回合某一方获胜时,则下回合开始时就会播放获胜那一队的歌曲,最多播放到回合结束,或歌曲播放完毕.
#include <amxmodx>
#include <amxmisc>
#define KEYS (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) //KEYS:1,2,3,4,5,6,7,8,9,0
new bool:play_sound[33]
//歌曲可以自行添加删减,CT和TS的歌曲数量不用一样,可以设定各自的数量
new tsoundlist[][] = { "G1Jockey001", "G1Jockey002", "G1Jockey003", "G1Jockey004", "G1Jockey005", "G1Jockey006", "G1Jockey007", "G1Jockey008", "G1Jockey009", "G1Jockey010", "G1Jockey011", "G1Jockey012", "G1Jockey014", "G1Jockey015" , "G1Jockey016" , "G1Jockey017" , "G1Jockey018" , "G1Jockey019" , "G1Jockey020" , "G1Jockey021", "G1Jockey022" , "G1Jockey023" , "G1Jockey024" , "G1Jockey025" , "G1Jockey026" , "G1Jockey027" , "G1Jockey028" , "G1Jockey029" , "G1Jockey030","G1Jockey031, "G1Jockey032" , "G1Jockey033" }, "G1Jockey034" , "G1Jockey035", "G1Jockey036" , "G1Jockey037", "G1Jockey038" , "G1Jockey039" , "G1Jockey040"  }
new ctsoundlist[][]= { "G1Jockey001", "G1Jockey002", "G1Jockey003", "G1Jockey004", "G1Jockey005", "G1Jockey006", "G1Jockey007", "G1Jockey008" , "G1Jockey009", "G1Jockey010", "G1Jockey011", "G1Jockey012", "G1Jockey014" , "G1Jockey015" , "G1Jockey016" , "G1Jockey017" , "G1Jockey018" , "G1Jockey019" , "G1Jockey020" , "G1Jockey021", "G1Jockey022" , "G1Jockey023" , "G1Jockey024" , "G1Jockey025" , "G1Jockey026" , "G1Jockey027" , "G1Jockey028" , "G1Jockey029" , "G1Jockey030","G1Jockey031, "G1Jockey032" }, "G1Jockey033" , "G1Jockey034" , "G1Jockey035", "G1Jockey036" , "G1Jockey037", "G1Jockey038" , "G1Jockey039" , "G1Jockey040"  }
//预设放歌曲的路径,以 cstrike\sound 为放置起点
new sound_path[] = "misc/"
new maxplayers
new win_team
public plugin_init()
{
 register_plugin("RoundSound", "2.0", "kevin14144")
 register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
 register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
 
 register_event("ResetHUD","NewRound","be")
 register_logevent("logevent_round_end", 2, "1=Round_End")
 
 register_clcmd("say /roundsound", "roundsound_set_menu")
 register_clcmd("say_team /roundsound", "roundsound_set_menu")
 register_menucmd(register_menuid("Set RoundSound Play"), KEYS, "roundsound_set_process")
 
 maxplayers = get_maxplayers()
}
public plugin_precache()
{
 new i, temp[128]
 
 for (i = 0; i < sizeof tsoundlist; i++)
 {
  format(temp, sizeof temp -1, "%s%s.mp3", sound_path, tsoundlist)
  precache_sound(temp)
 }
 
 for (i = 0; i < sizeof ctsoundlist; i++)
 {
  format(temp, sizeof temp -1, "%s%s.mp3", sound_path, ctsoundlist)
  precache_sound(temp)
 }
 
 for (i = 1; i <= 32; i++)
  play_sound = true
 
 return PLUGIN_CONTINUE
}
public t_win()
{
 win_team = 1
 return PLUGIN_CONTINUE
}
public ct_win()
{
 win_team = 2
 return PLUGIN_CONTINUE
}
public NewRound()
{
 if (win_team > 0)
 {
  new i, sound[128]
  
  switch (win_team)
  {
   case 1:
   {
    i = random_num(0, sizeof tsoundlist -1)
    format(sound, sizeof sound -1, "%s%s", sound_path, tsoundlist)
   }
   case 2:
   {
    i = random_num(0, sizeof ctsoundlist -1)
    format(sound, sizeof sound -1, "%s%s", sound_path, ctsoundlist)
   }
  }
  
  for (i = 1; i <= maxplayers; i++)
  {
   if (play_sound)
    client_cmd(i, "mp3 play sound/%s", sound)
  }
 }
 
 win_team = 0
 
 return PLUGIN_CONTINUE
}
public logevent_round_end()
{
 client_cmd(0, "mp3 stop")
 return PLUGIN_CONTINUE
}
public roundsound_set_menu(id)
{
 new menu[256], len
 
 len = format(menu, sizeof menu - 1, "\r回合结束音乐播放设定^n^n")
 
 if (play_sound[id])
 {
  len += format(menu[len], sizeof menu - 1 - len, "\y1. 播放音乐^n")
  len += format(menu[len], sizeof menu - 1 - len, "\w2. 关掉音乐^n^n")
 }
 else
 {
  len += format(menu[len], sizeof menu - 1 - len, "\w1. 播放音乐^n")
  len += format(menu[len], sizeof menu - 1 - len, "\y2. 关掉音乐^n^n")
 }
 
 format(menu[len], sizeof menu - 1 - len, "\w0. 离开")
 
 show_menu(id, KEYS, menu, -1, "Set RoundSound Play")
}
public roundsound_set_process(id, key)
{
 switch (key)
 {
  case 0: play_sound[id] = true
  case 1: play_sound[id] = false
  case 9: return PLUGIN_HANDLED
  default:
  {
   roundsound_set_menu(id)
   return PLUGIN_HANDLED
  }
 }
 
 return PLUGIN_HANDLED
}


[ 此文章被grandc2000在2010-07-19 18:58重新编辑 ]




献花 x0 回到顶端 [楼 主] From:香港特别行政区 | Posted:2010-07-19 18:19 |
观众甲
个人头像
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖
小有名气
级别: 小有名气 该用户目前不上站
推文 x319 鲜花 x963
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

请不要用广东话


献花 x0 回到顶端 [1 楼] From:香港有线宽频 | Posted:2010-07-19 18:29 |
a7811311622 手机
个人头像
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖 优秀管理员勋章 社区建设奖
头衔:我…在工作了…我…在工作了…
版主
级别: 版主 该用户目前不上站
版区: CS提问区
推文 x771 鲜花 x2152
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

不就是你眼花改错…中途多了好几个不该有的「}」而已吗…? 表情


尚无签名,欢迎 [新增个性化签名]
献花 x0 回到顶端 [2 楼] From:台湾中华电信 | Posted:2010-07-19 18:53 |
grandc2000
数位造型
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

new tsoundlist[][] = { "G1Jockey001", "G1Jockey002", "G1Jockey003", "G1Jockey004", "G1Jockey005", "G1Jockey006", "G1Jockey007", "G1Jockey008", "G1Jockey009", "G1Jockey010", "G1Jockey011", "G1Jockey012", "G1Jockey014", "G1Jockey015" , "G1Jockey016" , "G1Jockey017" , "G1Jockey018" , "G1Jockey019" , "G1Jockey020" , "G1Jockey021", "G1Jockey022" , "G1Jockey023" , "G1Jockey024" , "G1Jockey025" , "G1Jockey026" , "G1Jockey027" , "G1Jockey028" , "G1Jockey029" , "G1Jockey030","G1Jockey031, "G1Jockey032" , "G1Jockey033" , "G1Jockey034" , "G1Jockey035", "G1Jockey036" , "G1Jockey037", "G1Jockey038" , "G1Jockey039" , "G1Jockey040"  }
new ctsoundlist[][]= { "G1Jockey001", "G1Jockey002", "G1Jockey003", "G1Jockey004", "G1Jockey005", "G1Jockey006", "G1Jockey007", "G1Jockey008" , "G1Jockey009", "G1Jockey010", "G1Jockey011", "G1Jockey012", "G1Jockey014" , "G1Jockey015" , "G1Jockey016" , "G1Jockey017" , "G1Jockey018" , "G1Jockey019" , "G1Jockey020" , "G1Jockey021", "G1Jockey022" , "G1Jockey023" , "G1Jockey024" , "G1Jockey025" , "G1Jockey026" , "G1Jockey027" , "G1Jockey028" , "G1Jockey029" , "G1Jockey030","G1Jockey031, "G1Jockey032" , "G1Jockey033" , "G1Jockey034" , "G1Jockey035", "G1Jockey036" , "G1Jockey037", "G1Jockey038" , "G1Jockey039" , "G1Jockey040"  }




以修改 都系唔得


献花 x0 回到顶端 [3 楼] From:香港特别行政区 | Posted:2010-07-19 19:00 |
grandc2000
数位造型
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

图 1. 我一放入去 个compile 就咁样   
我一放入去 个compile 就咁样



3643634634643


献花 x0 回到顶端 [4 楼] From:香港特别行政区 | Posted:2010-07-19 19:07 |
a7811311622 手机
个人头像
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖 优秀管理员勋章 社区建设奖
头衔:我…在工作了…我…在工作了…
版主
级别: 版主 该用户目前不上站
版区: CS提问区
推文 x771 鲜花 x2152
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 grandc2000 于 2010-07-19 19:07 发表的 : 到引言文
3643634634643

问题有三:
1.那两段的字串太长了…请改短一点…
2.你的SMA编码是UTF-8却有勾选署名…
3.请你用书面语吧…我看不太懂广东话…


尚无签名,欢迎 [新增个性化签名]
献花 x0 回到顶端 [5 楼] From:台湾中华电信 | Posted:2010-07-19 19:27 |
grandc2000
数位造型
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

解决了.......................


献花 x0 回到顶端 [6 楼] From:香港特别行政区 | Posted:2010-07-19 22:07 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.015127 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言