發新話題
打印

請問有冇自殺既單獨插件?

[Close]
岩岩寫完 未試
複製內容到剪貼板
代碼:
#include <sourcemod>
#define PLUGIN_VERSION "0.0.0.0.1"
public Plugin:myinfo =
{
name = "sm_kill",
author = "apple_W/david43",
description = "自殺插件",
version = PLUGIN_VERSION,
url = ""
}
public OnPluginStart()
{
RegConsoleCmd("sm_kill", Command_kill);
}
public Action:Command_kill(client, args)
{
new Flags = GetCommandFlags("kill");
SetCommandFlags("kill", Flags | FCVAR_CHEAT);
ClientCommand(client,"kill");
SetCommandFlags("kill", Flags ^ FCVAR_CHEAT);
}
附件: 您所在的用戶組無法下載或查看附件

TOP

引用:
原帖由 hihi1210 於 2011-6-28 14:02 發表
why not use ForcePlayerSudicide   ?
寫多幾句唔係威D咩
咁樣寫又得
複製內容到剪貼板
代碼:
#include <sourcemod>
#define PLUGIN_VERSION "0.0.0.0.1"
public Plugin:myinfo =
{
name = "sm_kill",
author = "apple_W/david43",
description = "自殺插件",
version = PLUGIN_VERSION,
url = ""
}
public OnPluginStart()
{
RegConsoleCmd("sm_kill", Command_kill);
}
public Action:Command_kill(client, args)
{
SlapPlayer(client,5000);
IgniteEntity(client, 2.0);
}
[ 本帖最後由 apple_W 於 2011-6-29 12:10 編輯 ]

TOP

if (GetEntProp(Client, Prop_Send, "m_isIncapacitated")==1)
SlapPlayer(client,99999);

TOP

發新話題