Требуется помощь очень надо кто может переделать скрипт из исходника? Плагин исходник это из контры Max Payne Zoom при выстреле из AWP (Scout) камера летит вслед за пулей! Кто может переделать для Half-Life, арбалета и кольта и камера чтоб летела тока при убийстве чела, а не при ранение тоже? Здесь файлы нельзя прикреплять вот вобщем #include <amxmodx>
#include <fakemeta>
#include <engine>
#include <cstrike>
#define PLUGIN "Max Payne Zoom"
#define AUTHOR "genesis"
#define VERSION "1.2"
#define CNAME "MPZ"
new lastweap[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar(CNAME, VERSION, FCVAR_SERVER)
register_forward(FM_PlayerPreThink, "forward_playerprethink")
register_event("DeathMsg","MPZ_eventDeath","a")
register_event("CurWeapon","handle_gun","be","1=1")
register_cvar("MPZ_velocity", "2000") // recommend setting around 6000 set sv_maxvelocity to 6000 as well
register_cvar("MPZ_active", "1") // set to zero = no zooming at all(supercedes all others)
register_cvar("MPZ_zoomOnHS", "1") // set to one = only zoom on hs's
register_cvar("MPZ_awp", "1")
register_cvar("MPZ_scout", "1")
}
public plugin_precache()
{
precache_model("models/shell.mdl")
}
public MPZ_eventDeath()
{
new theKiller = read_data(1)
new headshot = read_data(3)
if(!theKiller) return PLUGIN_CONTINUE
if(lastweap[theKiller] == CSW_AWP && get_cvar_num("MPZ_awp"))
{
}
else if(lastweap[theKiller] == CSW_SCOUT && get_cvar_num("MPZ_scout"))
{
}
else
{
return PLUGIN_CONTINUE
}
if(!get_cvar_num("MPZ_active")) return PLUGIN_CONTINUE
if(get_cvar_num("MPZ_zoomOnHS"))
{
if(!headshot) return PLUGIN_CONTINUE
}
new Float: Origin[3], Float: Velocity[3], Float: vAngle[3], Ent
entity_get_vector(theKiller, EV_VEC_origin , Origin)
entity_get_vector(theKiller, EV_VEC_v_angle, vAngle)
Ent = create_entity("info_target")
if(!is_valid_ent(Ent))
return FMRES_IGNORED
entity_set_string(Ent, EV_SZ_classname, "MPZ_chaser")
entity_set_model(Ent, "models/shell.mdl")
new Float:MinBox[3] = {-1.0, -1.0, -1.0}
new Float:MaxBox[3] = {1.0, 1.0, 1.0}
entity_set_vector(Ent, EV_VEC_mins, MinBox)
entity_set_vector(Ent, EV_VEC_maxs, MaxBox)
entity_set_float(Ent, EV_FL_gravity, 0.01)
entity_set_origin(Ent, Origin)
entity_set_vector(Ent, EV_VEC_angles, vAngle)
entity_set_int(Ent, EV_INT_effects, 2)
entity_set_int(Ent, EV_INT_solid, 1)
entity_set_int(Ent, EV_INT_movetype, 10)
entity_set_edict(Ent, EV_ENT_owner, theKiller)
VelocityByAim(theKiller, get_cvar_num("MPZ_velocity"), Velocity)
entity_set_vector(Ent, EV_VEC_velocity ,Velocity)
attach_view(theKiller, Ent)
return PLUGIN_CONTINUE
}
public vexd_pfntouch(pToucher, pTouched)
{
new szClassName[32]
if ( pToucher > 0)
{
if(!is_valid_ent(pToucher))
return PLUGIN_CONTINUE
entity_get_string(pToucher, EV_SZ_classname, szClassName, 31)
}
if(equal(szClassName, "MPZ_chaser"))
{
new oid = entity_get_edict(pToucher, EV_ENT_owner)
attach_view(oid, oid)
remove_entity(pToucher)
}
return PLUGIN_CONTINUE
}
public client_disconnect(id)
{
lastweap[id] = 0
}
public handle_gun(id)
{
new clip, ammo
new weap = get_user_weapon(id,clip,ammo)
if(lastweap[id] == weap)
return PLUGIN_CONTINUE
else
lastweap[id] = weap
return PLUGIN_CONTINUE
}