» Descriere : Cu ajutorul acestui plugin puteti crea un mic efect la grenada HE. Cand veti face damage mai mare sau egal cu 50 [size=85](valoarea se poate modifica printr-un cvar)[/size] unui adversar camera acestuia se va inroti la fel si mainile acestuia (ceva de genul) + ecranul ii se va inrosi pentru cateva secunde.
» Download : Link !
[sursa=]#include
#include
#define FadeX_R 255
#define FadeX_G 0
#define FadeX_B 0
#define FadeX_ALPHA 175
new HE_DMG, g_MsgScreenFade
public plugin_init()
{
register_plugin("HE EFFECT", "0.1", "P.Of.Pw")
register_event("Damage", "event_damage", "be", "2!0","3=0","4!0")
HE_DMG = register_cvar("he_effect_dmg", "50")
g_MsgScreenFade = get_user_msgid("ScreenFade")
}
public event_damage(id)
{
if(!is_user_alive(id))
return PLUGIN_HANDLED
new damage = read_data(2)
new weapon, hitzone
new attacker = get_user_attacker(id, weapon, hitzone)
new dmg = get_pcvar_num(HE_DMG)
new Float: Random_Float[3]
for (new i = 0; i < 3; i++) Random_Float[i] = random_float(125.0, 150.0)
if (attacker && weapon == CSW_HEGRENADE)
{
if (dmg <= 0)
return PLUGIN_CONTINUE
else if (damage >= dmg)
{
entity_set_vector(id, EV_VEC_punchangle, Random_Float)
create_fadex(id, FadeX_R, FadeX_G, FadeX_B, FadeX_ALPHA)
}
}
return PLUGIN_HANDLED
}
create_fadex(index, r, g, b, alpha)
{
message_begin(MSG_ONE_UNRELIABLE, g_MsgScreenFade, { 0, 0, 0 }, index)
write_short(1<<14) // time 0
write_short(1<<14) // time 1
write_short(1<<10) // time 2
write_byte(r)
write_byte(g)
write_byte(b)
write_byte(alpha)
message_end()
}[/sursa]
» Nume : HE EFFECT
» Autor : PoSiTiOn Of PoWeR ; multumuri pentru teste
» Versiune : 0.1
» Instalare :
1. Fisierul HE_EFFECT.sma il puneti in addons/amxmodx/scripting
2. Fisierul HE_EFFECT.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
» Cvars : he_effect_dmg damage-ul pe care va trebui sa il faceti unui jucator cu grenade HE pentru a crea efectul; implicit 50
» Module necesare : engine
» Altele :
[sursa=]#define FadeX_R 255 // culoarea in format RRR - la culoarea ecranului
#define FadeX_G 0 // culoarea in format GGG - la culoarea ecranului
#define FadeX_B 0 // culoarea in format BBB - la culoarea ecranului
#define FadeX_ALPHA 175 // transparenta culori[/sursa]
» Imagini : [Trebuie sa fiti înscris şi conectat pentru a vedea această imagine]
GL & HF !
» Download : Link !
- Sursa:
[sursa=]#include
#include
#define FadeX_R 255
#define FadeX_G 0
#define FadeX_B 0
#define FadeX_ALPHA 175
new HE_DMG, g_MsgScreenFade
public plugin_init()
{
register_plugin("HE EFFECT", "0.1", "P.Of.Pw")
register_event("Damage", "event_damage", "be", "2!0","3=0","4!0")
HE_DMG = register_cvar("he_effect_dmg", "50")
g_MsgScreenFade = get_user_msgid("ScreenFade")
}
public event_damage(id)
{
if(!is_user_alive(id))
return PLUGIN_HANDLED
new damage = read_data(2)
new weapon, hitzone
new attacker = get_user_attacker(id, weapon, hitzone)
new dmg = get_pcvar_num(HE_DMG)
new Float: Random_Float[3]
for (new i = 0; i < 3; i++) Random_Float[i] = random_float(125.0, 150.0)
if (attacker && weapon == CSW_HEGRENADE)
{
if (dmg <= 0)
return PLUGIN_CONTINUE
else if (damage >= dmg)
{
entity_set_vector(id, EV_VEC_punchangle, Random_Float)
create_fadex(id, FadeX_R, FadeX_G, FadeX_B, FadeX_ALPHA)
}
}
return PLUGIN_HANDLED
}
create_fadex(index, r, g, b, alpha)
{
message_begin(MSG_ONE_UNRELIABLE, g_MsgScreenFade, { 0, 0, 0 }, index)
write_short(1<<14) // time 0
write_short(1<<14) // time 1
write_short(1<<10) // time 2
write_byte(r)
write_byte(g)
write_byte(b)
write_byte(alpha)
message_end()
}[/sursa]
» Nume : HE EFFECT
» Autor : PoSiTiOn Of PoWeR ; multumuri
» Versiune : 0.1
» Instalare :
1. Fisierul HE_EFFECT.sma il puneti in addons/amxmodx/scripting
2. Fisierul HE_EFFECT.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
- Cod:
HE_EFFECT.amxx
» Cvars : he_effect_dmg
» Module necesare : engine
» Altele :
[sursa=]#define FadeX_R 255 // culoarea in format RRR - la culoarea ecranului
#define FadeX_G 0 // culoarea in format GGG - la culoarea ecranului
#define FadeX_B 0 // culoarea in format BBB - la culoarea ecranului
#define FadeX_ALPHA 175 // transparenta culori[/sursa]
» Imagini : [Trebuie sa fiti înscris şi conectat pentru a vedea această imagine]
GL & HF !