搜索
查看: 3182|回复: 3

求个丢拆弹器的插件

[复制链接]
发表于 2006-10-13 11:23:57 | 显示全部楼层 |阅读模式 来自 中国–广东–深圳–罗湖区
以前在DT里面见过  搜不到啦~  谢谢热心朋友啦~
发表于 2006-10-13 12:50:19 | 显示全部楼层 来自 中国–山西–忻州

回复: 求个丢拆弹器的插件

我好像在DT见过,帮你找找...
回复

使用道具 举报

发表于 2006-10-13 19:00:45 | 显示全部楼层 来自 中国–云南–昆明

回复: 求个丢拆弹器的插件

dropdefuser.amxx ;警察可以丢掉拆雷钳(需要开启engine和cstrike模块)

[php]/* Drop Defuser Kit 1.0 (for AMX Mod X 0.20 RC5 and above)
*
* by Damaged Soul
*
* This file is provided as is (no warranties)
*
* Description:
* This plugin allows the CT team to drop their defuser kits on the ground.
* Since defuser kits are dropped on death anyways, why not allow a CT to voluntarily
* drop it as well?
*
* Usage:
* Bind "dropdefuser" to any key or just type the command in the console.
*
* For example, by typing: bind v dropdefuser
* in the console, you will have bound the V key to drop the defuser kit
*
* Version History:
* 1.0
* - Initial release
*
*/

#include <amxmodx>
#include <engine>
#include <cstrike>
new bool:canpickup[33]
public plugin_init() {
register_plugin("Drop Defuser Kit", "1.0", "Damaged Soul")

register_clcmd("dropdefuser", "drop_defkit", 0, "- drops defuser kit if you have one")
register_touch("item_thighpack", "player", "defkit_touch")
register_event("ResetHUD", "defkit_cleanup", "b")
}
public plugin_modules() {
require_module("engine")
require_module("cstrike")
}
public drop_defkit(id) {
if (cs_get_user_team(id) == CS_TEAM_CT && cs_get_user_defuse(id)) {

canpickup[id] = false
cs_set_user_defuse(id, 0) // Get rid of player's defuser kit
new defkit = create_entity("info_target") // Create a new entity for the fake defuser kit

if (!defkit)
return PLUGIN_HANDLED_MAIN

new Float:origin[3]
entity_get_vector(id, EV_VEC_origin, origin)
new Float:velocity[3]
new Float:mins[3] = {-2.5, -2.5, -2.5}
new Float:maxs[3] = {2.5, 2.5, 2.5}
entity_set_string(defkit, EV_SZ_classname, "item_thighpack")
entity_set_model(defkit, "models/w_thighpack.mdl")
entity_set_vector(defkit, EV_VEC_mins, mins)
entity_set_vector(defkit, EV_VEC_maxs, maxs)
entity_set_origin(defkit, origin)
entity_set_int(defkit, EV_INT_effects, EF_NOINTERP)
entity_set_int(defkit, EV_INT_solid, SOLID_TRIGGER)
entity_set_int(defkit, EV_INT_movetype, MOVETYPE_TOSS)
entity_set_edict(defkit, EV_ENT_owner, id)
velocity_by_aim(id, 400, velocity)
entity_set_vector(defkit, EV_VEC_velocity, velocity)

new parm[1]
parm[0] = id
set_task(0.1, "safedrop", 3215862+ id, parm[0], 1)
}

return PLUGIN_HANDLED
}
public safedrop(parm[])
{
canpickup[parm[0]] = true
}
public defkit_touch(entid, userid) {
if (canpickup[userid] && cs_get_user_team(userid) == CS_TEAM_CT && !cs_get_user_defuse(userid)) {
remove_entity(entid) // Remove the defuser kit on the ground
cs_set_user_defuse(userid, 1) // Give player the defuser kit

client_print(userid, print_center, "#Got_defuser")
}
return PLUGIN_CONTINUE
}
/* Remove all spawned defuser kit entities on new rounds */
public defkit_cleanup() {
new defkit = find_ent_by_class(-1, "item_thighpack");
while (defkit) {
remove_entity(defkit)
defkit = find_ent_by_class(defkit, "item_thighpack");
}
return PLUGIN_CONTINUE
}[/php]
回复

使用道具 举报

 楼主| 发表于 2006-10-14 08:28:44 | 显示全部楼层 来自 中国–广东–深圳–罗湖区

回复: 求个丢拆弹器的插件

谢谢楼上的朋友啦``~
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表