Raised This Month: $ Target: $400
 0% 

bomb drop Glow Sheel


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
layka_LUBII
Senior Member
Join Date: Jul 2012
Old 02-17-2013 , 12:22   bomb drop Glow Sheel
Reply With Quote #1

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)
}

Last edited by layka_LUBII; 02-17-2013 at 14:16.
layka_LUBII is offline
layka_LUBII
Senior Member
Join Date: Jul 2012
Old 02-18-2013 , 14:56   Re: bomb drop Glow Sheel
Reply With Quote #2

Please LOCk thank you
layka_LUBII is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode