|
发表于 2008-10-29 01:03:34
|
显示全部楼层
|阅读模式
来自 中国–福建–龙岩
中文语音报时不知道大家有没有用过?我用了发现有个大问题:只有现在时间几点的声音,没有分钟和秒的声音?希望作者能够帮忙修改下。
注:所有声音都下载了。
#include <amxmodx>
#define PLUGIN "Time"
#define VERSION "1.0"
#define AUTHOR "Jim"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say time", "show_time")
}
public show_time(id)
{
new player = get_user_flags(id) & ADMIN_CHAT ? 0 : id
new voice[33]
new apm
new hour, minute, second
time(hour, minute, second)
apm = hour / 6
if(hour > 12) hour %= 12
formatex(voice, 32, "voicetime/time apm%d %c%d h", apm, hour > 2 ? ' ' : 't', hour)
if(minute)
{
new mv[5]
if(minute <= 12 || !(minute % 10)) num_to_str(minute, mv, 2)
else formatex(mv, 4, "%d %d", minute / 10 * 10, minute % 10)
formatex(voice, 32, "%s %s m", voice, mv)
}
client_cmd(player, "spk fvox/bell")
client_cmd(player, "spk ^"%s^"", voice)
return PLUGIN_HANDLED
} 原帖http://www.dt-club.net/forum/showthread.php?t=33236 |
|