[求助]谁帮我改下去掉连接服务器的声音
本帖最后由 coolhurter 于 2009-10-17 13:43 编辑#include <amxmodx>
#define PLUGIN "Connect Announce"
#define VERSION "0.2"
#define AUTHOR "v3x"
new g_iMsgSayText, g_szSoundFile[] = "buttons/blip1.wav";
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
g_iMsgSayText = get_user_msgid("SayText");
}
public plugin_precache()
{
precache_sound(g_szSoundFile);
}
public client_authorized(id)
{
if(is_user_bot(id)) return PLUGIN_CONTINUE;
new szUserName;
get_user_name(id, szUserName, 32);
new szAuthID;
get_user_authid(id , szAuthID , 32);
new iPlayers, iNum, i;
get_players(iPlayers, iNum);
for(i = 0; i <= iNum; i++)
{
new x = iPlayers;
if(!is_user_connected(x) || is_user_bot(x)) continue;
client_cmd(x, "spk %s", g_szSoundFile);
new szMessage;
format(szMessage, 163, "^x04%s (^x01%s^x04) connected", szUserName , szAuthID);
message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );
write_byte( x );
write_string( szMessage );
message_end ();
}
return PLUGIN_CONTINUE;
}哪位仁兄,帮我把这插件去掉 连接服务器 的时候声音.
谢谢了 人呢,,最近怎么都没人
连发几个帖子,都没人响应了 本帖最后由 INSUN 于 2009-10-17 20:48 编辑
#include <amxmodx>
#define PLUGIN "Connect Announce"
#define VERSION "0.2"
#define AUTHOR "v3x"
new g_iMsgSayText
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
g_iMsgSayText = get_user_msgid("SayText");
}
public client_authorized(id)
{
if(is_user_bot(id)) return PLUGIN_CONTINUE;
new szUserName;
get_user_name(id, szUserName, 32);
new szAuthID;
get_user_authid(id , szAuthID , 32);
new iPlayers, iNum, i;
get_players(iPlayers, iNum);
for(i = 0; i <= iNum; i++)
{
new x = iPlayers;
if(!is_user_connected(x) || is_user_bot(x)) continue;
new szMessage;
format(szMessage, 163, "^x04%s (^x01%s^x04) connected", szUserName , szAuthID);
message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );
write_byte( x );
write_string( szMessage );
message_end ();
}
return PLUGIN_CONTINUE;
}
没有测试,自己试一下 你的换行,怎么换了3行.
额. 一般的只有1行呀 我倒还想把声音加进去 。。。。。。。。。。。。我菜更菜 看不懂!!! 第七行
new g_iMsgSayText, g_szSoundFile[] = "buttons/blip1.wav";
buttons/blip1.wav 这个就是的 本帖最后由 sakulekingz 于 2010-6-9 18:59 编辑
第七行改成new g_iMsgSayText//, g_szSoundFile[] = "buttons/blip1.wav";十五至十八行改成/* public plugin_precache()
{
precache_sound(g_szSoundFile);
}*/第三十九行改成//client_cmd(x, "spk %s", g_szSoundFile); 呵呵
不懂没关系多自己看点源代码慢慢的就会了 还有一个不用这么麻烦的!你找个WAV声音文件就1秒的没有声音的替换掉你的那个声音文件就可以拉! 最
简单的就是这样!哈哈!
页:
[1]