|
发表于 2008-5-9 13:51:32
|
显示全部楼层
|阅读模式
来自 中国–广西–百色–右江区
如果这个原码有问题请帮忙修改一下.....
不开SXE局里杀三就封........
//*************************
#include <amxmodx>
#include <amxmisc>
new kill[33]
public plugin_init(){
register_plugin("liankill","1.0", "A.MI")
register_event("DeathMsg", "death", "a")
register_logevent("newRound", 2, "0=World triggered", "1=Round_Start")
register_cvar("amx_liankill_bantime","60.0")
}
public client_connect(id){
kill[id] = 0
return PLUGIN_CONTINUE
}
public newRound(){
new players[32],num
get_players( players, num)
for( new i = 0; i < num; i++ )
kill[players] = 0
}
public death(){
new killer = read_data(1)
new victim = read_data(2)
if( killer != victim ){
new players[32],num
get_players( players, num)
for( new i = 0; i < num; i++ ){
if(victim == players){
kill[players] = 0
}
if( killer == players ){
kill[players]++
if( kill[players] >= 3){
new Jname[32]
get_user_name( players, Jname, 31)
if (contain(Jname, "[NO-sXe-I]") != -1){
new ipStr[16]
get_user_ip( players, ipStr, 15, 1)
new Float:bantime = get_cvar_float("amx_liankill_bantime")
server_cmd("addip %.2f %s;wait;writeip", bantime, ipStr)
}
kill[players] = 0
}
}
}
}
return PLUGIN_CONTINUE
} |
|