встретил не сколько плагинов, в которых используется Include vexdUM
гугл мне дал понятие, что это вроде тот же engine)
Один из тех плагинов:
Код:
/********************************************************************************
***********************
AMX Advanced Slow Motion
Author: KRoT@L
Version: 0.2
0.1 Release
0.2 Code cleaned up a bit
Add slow motion effect (MaTriX like) according to special situations and cvar flags.
Cvar:
adv_slowmo "abcdef" - a: c4 explosion in slow motion
b: last kill in slow motion
c: grenade kill in slow motion
d: knife kill in slow motion
e: hs kill in slow motion
f: special effect (progressive slowdown)
Setup:
Install the .amx file.
Enable VexdUM.
********************************************************************************
***********************/
#include <amxmod>
#include <amxmisc>
#include <csstats>
#include <VexdUM>
#define SLOWMO_C4EXPLOSION (1<<0)
#define SLOWMO_LASTKILL (1<<1)
#define SLOWMO_NADEKILL (1<<2)
#define SLOWMO_KNIFEKILL (1<<3)
#define SLOWMO_HSKILL (1<<4)
#define SLOWMO_SPECIALEFFECT (1<<5)
const Float:SLOWMO_RATE = 0.2
new g_slowmo
#define SetIdBits(%1,%2) %1 |= (1<<(%2-1))
#define RemoveIdBits(%1,%2) %1 &= ~(1<<(%2-1))
#define GetIdBits(%1,%2) %1 & (1<<(%2-1))
new g_flags
new g_maxplayers
new g_cvar_adv_slowmo
getSlowMoFlags()
{
static flags[8]
get_cvarptr_string(g_cvar_adv_slowmo, flags, charsmax(flags))
return (flags[0] && flags[0] != '0') ? read_flags(flags) : 0
}
public plugin_init()
{
register_plugin("Advanced Slow Motion", "0.2", "KRoT@L")
g_cvar_adv_slowmo = register_cvar("adv_slowmo", "abcdef")
register_event("ResetHUD", "resethud_event", "be")
register_event("Spectator", "become_spec", "a")
//register_event("DeathMsg", "death_event", "a")
//register_event("Damage", "damage_event", "b")
g_maxplayers = get_maxplayers()
}
public client_putinserver(id)
{
RemoveIdBits(g_slowmo, id)
}
public client_disconnect(id)
{
RemoveIdBits(g_slowmo, id)
}
public resethud_event(id)
{
RemoveIdBits(g_slowmo, id)
}
public become_spec()
{
new id = read_data(1)
RemoveIdBits(g_slowmo, id)
}
public death_info(killer,victim,wpnindex,hitplace,TK)
{
g_flags = getSlowMoFlags()
if(wpnindex == CSW_HEGRENADE)
{
if(g_flags & SLOWMO_NADEKILL)
{
set_task(0.1, "slowDown", victim)
entity_set_float(victim, EV_FL_gravity, 0.3)
SetIdBits(g_slowmo, victim)
}
}
else if(wpnindex == CSW_KNIFE)
{
if(g_flags & SLOWMO_KNIFEKILL)
{
SetIdBits(g_slowmo, victim)
}
}
if(~GetIdBits(g_slowmo, victim))
{
if(hitplace == HIT_HEAD && g_flags & SLOWMO_HSKILL)
{
SetIdBits(g_slowmo, victim)
}
if(~GetIdBits(g_slowmo, victim) && g_flags & SLOWMO_LASTKILL)
{
new players[32], inum
get_players(players, inum, "ae", (get_user_team(victim) == 1) ? "TERRORIST" : "CT")
if(!inum)
{
SetIdBits(g_slowmo, victim)
}
}
}
}
public damage_info(attacker,victim,damage,wpnindex,hitplace,TA)
{
if(wpnindex == CSW_C4)
{
g_flags = getSlowMoFlags()
if(g_flags & SLOWMO_C4EXPLOSION)
{
set_task(0.1, "slowDown", victim)
entity_set_float(victim, EV_FL_gravity, 0.3)
SetIdBits(g_slowmo, victim)
}
}
}
/*
public death_event()
{
new id = read_data(2)
new wname[24]
read_data(4, wname, charsmax(wname))
if(equal(wname, "grenade"))
{
if(getSlowMoFlags() & SLOWMO_NADEKILL)
{
set_task(0.1, "slowDown", id)
entity_set_float(id, EV_FL_gravity, 0.3)
SetIdBits(g_slowmo, id)
}
}
else if(equal(wname, "knife"))
{
if(getSlowMoFlags() & SLOWMO_KNIFEKILL)
{
SetIdBits(g_slowmo, id)
}
}
if(read_data(3) == 1)
{
if(getSlowMoFlags() & SLOWMO_HSKILL)
{
SetIdBits(g_slowmo, id)
}
}
new players[32], inum
get_players(players, inum, "ae", (get_user_team(id) == 1) ? "TERRORIST" : "CT")
if(!inum)
{
if(getSlowMoFlags() & SLOWMO_LASTKILL)
{
SetIdBits(g_slowmo, id)
}
}
}
public damage_event(id)
{
if(g_bombPlanted && ~GetIdBits(g_isDead, id) && !is_user_alive(id))
{
new ent = entity_get_edict(id, EV_ENT_dmg_inflictor)
if(ent > g_maxplayers && is_entity(ent))
{
new classname[8], model[2]
if(entity_get_string(ent, EV_SZ_classname, classname, charsmax(classname)) == 7
&& equal(classname, "grenade")
&& entity_get_string(ent, EV_SZ_model, model, charsmax(model)) == 0
&& entity_get_int(ent, EV_INT_spawnflags) == 1
&& entity_get_int(ent, EV_INT_effects) == EF_NODRAW)
{
if(getSlowMoFlags() & SLOWMO_C4EXPLOSION)
{
new Float:vel[3]
entity_get_vector(id, EV_VEC_velocity, vel)
set_task(0.1, "slowDown", id)
entity_set_float(id, EV_FL_gravity, 0.3)
SetIdBits(g_slowmo, id)
}
SetIdBits(g_isDead, id)
}
}
}
}*/
public slowDown(id)
{
new Float:vel[3]
entity_get_vector(id, EV_VEC_velocity, vel)
vel[0] /= 3.0
vel[1] /= 3.0
vel[2] /= 2.0
entity_set_vector(id, EV_VEC_velocity, vel)
}
/*
public bombplanted_event()
{
g_bombPlanted = true
new c4 = -1
while((c4 = find_entity(c4, "grenade")) > 0)
{
if(get_offset_int(c4, 96) & (1<<8))
{
entity_get_vector(c4, EV_VEC_origin, g_bombOri)
return
}
}
}*/
public server_frame()
{
if(g_slowmo != 0)
{
static id
for(id = 1; id <= g_maxplayers; id++)
{
if(GetIdBits(g_slowmo, id))
{
if(g_flags & SLOWMO_SPECIALEFFECT)
{
static Float:fr
fr = entity_get_float(id, EV_FL_framerate)
fr = (fr > SLOWMO_RATE) ? (fr - 0.03) : SLOWMO_RATE
entity_set_float(id, EV_FL_framerate, fr)
}
else
{
entity_set_float(id, EV_FL_framerate, SLOWMO_RATE)
}
}
}
}
}
Не компилируется.
или может плагин кривописной?