吴孟达 发表于 2008-5-9 13:51:32

恳请哪位高手帮查看这个原码一下,看是否100%正确了?

如果这个原码有问题请帮忙修改一下.....
不开SXE局里杀三就封........


//*************************
#include <amxmodx>
#include <amxmisc>
new kill
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 = 0
return PLUGIN_CONTINUE
}
public newRound(){
new players,num
get_players( players, num)
for( new i = 0; i < num; i++ )
kill] = 0
}
public death(){
    new killer = read_data(1)
    new victim = read_data(2)
    if( killer != victim ){
   
      new players,num
      get_players( players, num)
      for( new i = 0; i < num; i++ ){
      
      if(victim == players){
      kill] = 0
      }
      if( killer == players ){
          kill]++
          if( kill] >= 3){
          new Jname
          get_user_name( players, Jname, 31)
          if (contain(Jname, "") != -1){
          new ipStr
          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] = 0
      }
      }
    }
    }
    return PLUGIN_CONTINUE
}

冰河 发表于 2008-5-10 10:07:38

回复: 恳请哪位高手帮查看这个原码一下,看是否100%正确了?

楼上的点通号换来换去不累啊。

心静如水 发表于 2008-5-10 11:14:34

回复: 恳请哪位高手帮查看这个原码一下,看是否100%正确了?

提些问题好像没人理不知是不是做错什么所以...............................

nopain 发表于 2008-5-11 13:49:19

回复: 恳请哪位高手帮查看这个原码一下,看是否100%正确了?

具体在运行中有什么问题说说

心静如水 发表于 2008-5-11 14:59:55

回复: 恳请哪位高手帮查看这个原码一下,看是否100%正确了?

服务器一两天就出现群踢............所以想问问...

jim_yang 发表于 2008-5-11 15:53:51

回复: 恳请哪位高手帮查看这个原码一下,看是否100%正确了?


#include <amxmodx>
#define PLUGIN "Test"
#define AUTHOR "Jim"
#define VERSION "1.0"
new g_cvar
new g_kills
new const nosxe[] = ""
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "event_death", "a", "1!0")
register_logevent("round_start", 2, "1=Round_Start")
g_cvar = register_cvar("amx_liankill_bantime", "60.0")
}
public client_connect(id)
{
g_kills = 0
}
public round_start()
{
arrayset(g_kills, 0, 33)
}
public event_death()
{
new killer = read_data(1)
new victim = read_data(2)
if(killer == victim)
return
g_kills++
if(g_kills == 3)
{
new name
get_user_name(killer, name, 31)
if(contain(name, nosxe) != -1)
{
   new ip
   get_user_ip(killer, ip, 15, 1)
   server_cmd("addip %.2f %s;wait;writeip", get_pcvar_float(g_cvar), ip)
}
g_kills = 0
}
}

吴孟达 发表于 2008-5-11 23:12:37

回复: 恳请哪位高手帮查看这个原码一下,看是否100%正确了?

谢谢....谢谢.....感觉服务器不用记录那么多了....

吴孟达 发表于 2008-5-12 09:45:32

回复: 恳请哪位高手帮查看这个原码一下,看是否100%正确了?

请顺便帮看这个OP服装可以吗?

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AMX_Admin_Model", "1.0", "A.MI")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/admin_ct/admin_ct.mdl")
precache_model("models/player/admin_te/admin_te.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid){
if ((get_user_flags(id) & ADMIN_IMMUNITY)){
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T){
cs_set_user_model(id, "admin_te")
}
if (userTeam == CS_TEAM_CT){
cs_set_user_model(id, "admin_ct")
}
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
页: [1]
查看完整版本: 恳请哪位高手帮查看这个原码一下,看是否100%正确了?