HsK
CCN@HsK

级别: 版主 
版区: CS插件区
x1701
x1108
|
分享:
▲
▼
刚刚看了看 podbot 和 sypb 的 Src.. 写出以下代码
stock is_bot_type (id) { if (!is_user_bot (id)) return 0; // not bot
new tracker[2], friends[2], ah[2]; get_user_info(id,"tracker",tracker,1); get_user_info(id,"friends",friends,1); get_user_info(id,"_ah",ah,1);
if (tracker[0] == '0' && friends[0] == '0' && ah[0] == '0') return 1; // PodBot / YaPB / SyPB
return 2; // Zbot }
那你应该懂了吧...
|
HsK-Dev Blog By CCN
|
x0
[4 楼]
From:未知地址 | Posted:2012-06-29 16:34 |
|
|
HsK
CCN@HsK

级别: 版主 
版区: CS插件区
x1701
x1108
|
分享:
▲
以下为用法 复制程式
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define PLUGIN_NAME "Ham - Bot Get (ZBOT-PODBOT-SyPB)"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "HsK"
new bool:Ham_load = false, cvar_botquota;
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
RegisterHam(Ham_TakeDamage,"player","fw_TakeDamage");
cvar_botquota = get_cvar_pointer("bot_quota");
}
public client_putinserver(id)
set_task (1.0, "Ham_run", id);
public Ham_run (id)
{
server_print("Bot Type : %s", (is_bot_type (id) == 2 ? "Zbot" : (is_bot_type (id) == 1 ? "SyPB/YaPB/PodBot" : "This is not Bot")));
if (!is_user_connected(id) || !get_pcvar_num(cvar_botquota) || Ham_load)
return;
if (is_bot_type (id) != 2)
return;
Ham_load = true;
RegisterHamFromEntity(Ham_TakeDamage,id,"fw_TakeDamage");
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
if (victim == attacker || !attacker)
return;
client_print (attacker, print_chat, "** fw_TakeDamage **Damage! Bot id : %d", victim);
}
stock is_bot_type (id)
{
if (!is_user_bot (id))
return 0; // not bot
new tracker[2], friends[2], ah[2];
get_user_info(id,"tracker",tracker,1);
get_user_info(id,"friends",friends,1);
get_user_info(id,"_ah",ah,1);
if (tracker[0] == '0' && friends[0] == '0' && ah[0] == '0')
return 1; // PodBot / YaPB / SyPB
return 2; // Zbot
}
|
HsK-Dev Blog By CCN
|
x1
[5 楼]
From:未知地址 | Posted:2012-06-29 16:37 |
|
|
|