|
楼主 |
发表于 2006-8-26 23:48:13
|
显示全部楼层
来自 中国–广东–梅州
回复: 点通高手可否为局域网CS服务器写一个插件
/*==============================================================================
* Plugin name: Suicide Text 0.1
* Made by: Fyre
* Modules required: none
*===============================================================================*/
#include <amxmod>
public plugin_init() {
register_plugin("Suicide Text","0.2","Fyre")
register_logevent("DeathMsg",4,"1=committed suicide with")
register_logevent("consolesuicide",3,"1=committed suicide with")
register_event("DeathMsg","knife_kill","a","4&kni")
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_sound( "djeyl/witch.wav")
return PLUGIN_CONTINUE
}
// when you die by falling somewhere off
public DeathMsg() {
new Arg1[64]
read_logargv(0,Arg1,63)
new Name[32]
parse_loguser(Arg1,Name,31)
client_cmd(0,"spk djeyl/witch")
set_hudmessage( 255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1);
show_hudmessage(0,"%s die by falling",Name)
return PLUGIN_HANDLED
}
// when you kill yourself by command kill
public consolesuicide() {
new Arg1[64]
read_logargv(0,Arg1,63)
new Name[32]
parse_loguser(Arg1,Name,31)
client_cmd(0,"spk djeyl/witch")
set_hudmessage( 255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, 1);
show_hudmessage(0,"%s kill himself",Name)
return PLUGIN_HANDLED
}
// when someone knived
public knife_kill(){
new killer_name[32], victim_name[32]
get_user_name(read_data(1),killer_name,31)
get_user_name(read_data(2),victim_name,31)
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"%s knived %s",killer_name,victim_name)
client_cmd(0,"spk djeyl/witch")
//return PLUGIN_HANDLED
}
这是刀子杀人的源码,请52yz帮一下,不过我们不要去跟那些没素质的人计较,我最讨厌那些老要人回帖的人。改好后顺便说一下在amx.cfg里该加入什么变量.在这里先谢谢52yz兄。 |
|