...classname problem !
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)
}
}
}
|