|
发表于 2007-12-22 14:45:41
|
显示全部楼层
来自 中国–福建–漳州
回复: 求助:玩家埋包或拆包时进入无敌状态插件
#include <amxmodx>
#include <fun>
#include <csx>
new bool:g_restart_attempt[33]
//----------------------------------------------------------------------------------------------
public plugin_init()
{
// Plugin Info
register_plugin("Bomb Godmode","1.1","Rulzy")
register_event("ResetHUD","eResetHUD","be")
register_clcmd("fullupdate", "cmd_fullupdate")
register_event("BarTime", "UnSetGodmode", "be", "1=0")
}
//----------------------------------------------------------------------------------------------
public cmd_fullupdate(id)
{
return PLUGIN_HANDLED
}
public eResetHUD(id)
{
if(!is_user_connected(id)) return PLUGIN_CONTINUE
if (g_restart_attempt[id])
{
g_restart_attempt[id] = false
return PLUGIN_CONTINUE
}
ePlayerSpawn(id)
return PLUGIN_CONTINUE
}
public ePlayerSpawn(id)
{
UnSetGodmode(id)
}
//----------------------------------------------------------------------------------------------
public bomb_planting(id)
{
if (is_user_connected(id) && is_user_alive(id) )
{
remove_task(id);
set_task(5.0, "UnSetGodmode", id);
set_user_godmode(id, 1)
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.")
}
}
//----------------------------------------------------------------------------------------------
public bomb_defusing(id)
{
if (is_user_connected(id) && is_user_alive(id))
{
remove_task(id);
set_task(5.0, "UnSetGodmode", id);
set_user_godmode(id, 1)
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." )
}
}
//----------------------------------------------------------------------------------------------
public UnSetGodmode(id)
{
if(is_user_connected(id) && is_user_alive(id))
{
set_user_godmode(id, 0)
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 0)
}
}
public bomb_defused(id)
{
UnSetGodmode(id)
}
public bomb_planted(id)
{
UnSetGodmode(id)
} |
|