Raised This Month: $ Target: $400
 0% 

...classname problem !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZerroQ
Member
Join Date: Jun 2006
Location: European Union: Latvia
Old 06-29-2006 , 13:22   ...classname problem !
Reply With Quote #1

Hello there!
I saw the plugin ( Glow weapons ) posted by ( Schnitzelmaker )
And i realised, i would like to remake this plugin so that it makes to glow only the Bomb ( map type's de_ ) what Terrorist team has to plant.

Here's the plugin code, i removed some weapon glow lines, so it makes to glow only one item... but the problem for me now is.. what's the classname for Bomb ?

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#include <ns>
#include <fun>

#define PLUGIN "Glow Weapons"
#define VERSION "1.0"
#define AUTHOR "Schnitzelmaker"

new max_entities

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	set_task(0.1,"glow",_,_,_,"b")
	max_entities = get_global_int(GL_maxEntities)
	register_cvar("amx_glowbuild" ,"1")
}

public glow(){
glowbuildings("phasegate")
glowbuildings("team_turretfactory")
glowbuildings("team_observatory")
glowbuildings("team_infportal")
glowbuildings("team_prototypelab")
glowbuildings("team_command")
glowbuildings("team_armslab")
glowbuildings("siegeturret")
glowbuildings("resourcetower")
glowbuildings("turret")
glowbuildings("team_armory")
new i
for(i = 1 ; i <= max_entities ; i++){
	if (is_valid_ent(i) && ( entity_get_edict(i, EV_ENT_owner) == 0 )){
		new classname[64]
		entity_get_string(i, EV_SZ_classname, classname, 63)
		if (equal(classname , "weapon_bomb") ){
			set_rendering(i,kRenderFxGlowShell,188,220,255,kRenderNormal,25)
			}
		}
	}
}

public glowbuildings(name[]){
new i
new count = ns_get_build(name,0,0)
new temp
for (i = 1;i<=count;i++){
	temp = ns_get_build(name,0,i)
	if (ns_get_build(name,0,i) != ns_get_build(name,1,i)){
		set_rendering(temp,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
		}
	}
new count1 = ns_get_build(name,1,0)
new temp1
for (j = 1;j<=count1;j++){
temp1 = ns_get_build(name,1,j)
if (ns_get_build(name,1,j)){
	if (ns_get_mask(temp1,MASK_ELECTRICITY))
	{}
	else set_rendering(temp1,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
		}
	}
}
__________________
* we Create our own fate...
ZerroQ is offline
Send a message via Skype™ to ZerroQ
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-30-2006 , 12:13   Re: ...classname problem !
Reply With Quote #2

The bomb's classname is grenade. You should also check the model, which I think is w_backpack when not planted and w_c4 when planted.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 08:05.


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