| layka_LUBII |
02-17-2013 12:22 |
bomb drop Glow Sheel
Hi, I need this plugin converted to drop c4 please thank you
Code:
#include <amxmodx>
#include <csx>
#include <engine>
new thetime
new c4 = -1
public plugin_init()
{
register_plugin("C4 Glow Shell","0.2","GordonFreeman") // ICQ: 50429042
}
public bomb_planted(){
thetime = get_cvar_num("mp_c4timer")
set_task(1.0, "c4glow", 8038, "", 0, "b")
}
public c4glow(){
c4 = find_ent_by_model(c4, "grenade", "models/w_c4.mdl")
--thetime // countdown
// Set colors
new Float:colors[3]
if(thetime>=40){
colors[0] = 0.0
colors[1] = 128.0
colors[2] = 0.0
}
else if(thetime>=35){
colors[0] = 128.0
colors[1] = 255.0
colors[2] = 0.0
}
else if(thetime>=30){
colors[0] = 255.0
colors[1] = 255.0
colors[2] = 128.0
}
else if(thetime>=25){
colors[0] = 255.0
colors[1] = 255.0
colors[2] = 64.0
}
else if(thetime>=20){
colors[0] = 255.0
colors[1] = 128.0
colors[2] = 0.0
}
else if(thetime>=10){
colors[0] = 255.0
colors[1] = 128.0
colors[2] = 128.0
}
else if(thetime>=0){
colors[0] = 255.0
colors[1] = 0.0
colors[2] = 0.0
}
// Apply colors
entity_set_int(c4,EV_INT_rendermode,kRenderTransColor)
entity_set_int(c4,EV_INT_renderfx,kRenderFxGlowShell)
entity_set_vector(c4,EV_VEC_rendercolor,colors)
entity_set_float(c4,EV_FL_renderamt,128.0) // ammout of glow, try 255.0 or 1.0 ;)
if(thetime==0)
remove_task(8038)
}
|