/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <engine>
#define PLUGIN "jail_scan"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
new looking[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_impulse(100, "client_flashlight")
register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")
}
public client_connect(id) {
looking[id] = 0
}
public showStatus(id) {
static pid
pid = read_data(2)
if(get_user_team(pid) == 1 && get_user_team(id) == 2 && is_user_alive(pid)) {
looking[id] = pid
} else {
looking[id] = 0
}
}
public hideStatus(id) {
looking[id] = 0
}
public client_flashlight(id) {
if(looking[id]) {
static weapons[32], num, i
get_user_weapons(looking[id], weapons, num)
for(i = 0; i < num; i++) {
if(weapons[i] != CSW_KNIFE && weapons[i] > 0) {
fm_strip_user_gun2(looking[id], weapons[i])
}
}
}
}
stock bool:fm_strip_user_gun2(index, wid = 0, const wname[] = "") {
new ent_class[32];
if (!wid && wname[0])
copy(ent_class, sizeof ent_class - 1, wname);
else {
new weapon = wid, clip, ammo;
if (!weapon && !(weapon = get_user_weapon(index, clip, ammo)))
return false;
get_weaponname(weapon, ent_class, sizeof ent_class - 1);
}
new ent_weap = fm_find_ent_by_owner(-1, ent_class, index);
if (!ent_weap)
return false;
engclient_cmd(index, "drop", ent_class);
new ent_box = pev(ent_weap, pev_owner);
if (!ent_box || ent_box == index)
return false;
//dllfunc(DLLFunc_Think, ent_box);
return true;
}chodzi o przerobienie tak aby każdy CT mógł tego użyć tylko 1-2 razy na rundę ! najlepiej ilość ustawiana cvarami ;]
poleci pomógł
[ Dodano: 22-11-2009, 19:09 ]
pomoże ktoś ?!
[ Dodano: 24-11-2009, 20:40 ]
nikt nie umie zrobić


Dodatki SourceMod



Temat jest zamknięty






