|
发表于 2007-12-19 03:30:22
|
显示全部楼层
来自 中国–广东
回复: 求助:玩家埋包或拆包时进入无敌状态插件
修改了下,当玩家在拆C4或放C4时无敌但是也无法杀人,以防有人利用拆C4或放C4没完成时,利用无敌状态去杀人.没试过.自己测试下,
[php]
#include <amxmodx>
#include <fun>
#include <csx>
new bool:g_restart_attempt[33]
//----------------------------------------------------------------------------------------------
public plugin_init()
{
// Plugin Info
register_plugin("Bomb Godmode","1.1","Emp & X-man")
register_event("ResetHUD","eResetHUD","be")
register_clcmd("fullupdate", "cmd_fullupdate")
}
//----------------------------------------------------------------------------------------------
public cmd_fullupdate()
{
return PLUGIN_HANDLED
}
public eResetHUD(id)
{
if (g_restart_attempt[id])
{
g_restart_attempt[id] = false
return PLUGIN_CONTINUE
}
ePlayerSpawn(id)
return PLUGIN_CONTINUE
}
public ePlayerSpawn(id)
{
if(get_user_godmode(id))
set_user_godmode(id)
}
//----------------------------------------------------------------------------------------------
public bomb_planting(id)
{
if ( is_user_alive(id) )
{
set_user_godmode(id, 1)
set_user_hitzones(id,0,0)
set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 255)
client_print(id, print_chat, "[Bomb Godmode] You have 5 seconds of godmode for attempting to plant.")
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public bomb_defusing(id)
{
if ( is_user_alive(id) )
{
set_user_godmode(id, 1)
set_user_hitzones(id,0,0)
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 255)
client_print(id, print_chat, "[Bomb Godmode] You have 5 seconds of godmode for attempting to defuse." )
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public bomb_defused(id)
{
if(get_user_godmode(id))
set_user_godmode(id)
set_user_hitzones(id,0,255)
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 0)
}
public bomb_planted(id)
{
if(get_user_godmode(id))
set_user_godmode(id)
set_user_hitzones(id,0,255)
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 0)
}
[/php] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|