View Single Post
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-17-2022 , 07:55   Re: [Request] Making The Invisible Objects Colored In Maps
Reply With Quote #7

Certain ents or aspects like func_buyzone and worldspawn are not going to change color.

This script will help identify these areas by ducking and pressing use. Once they are identified one can add markers there if that helps at all.
PHP Code:
/*DUCK and press USE to output ent class*/
#include amxmodx
#include fakemeta
#include engine

#define is_valid_player(%1) (1 <= %1 <= g_MaxPlayers )
#define charsmin                      -1
new g_MaxPlayers;

public 
plugin_init()
{
    
register_touch("","player""@touch_inquiry")
    
register_plugin("Ent Inquiry""A"".sρiηX҉.");
    
g_MaxPlayers get_maxplayers()
}


@
touch_inquiry(victimattacker)
{
    if(
pev_valid(victim) &&  pev_valid(attacker))
    if(
is_valid_player(attacker)/*limits to player only*/ || is_valid_player(victim) )
    {
        
//if duck and use then show...
        
new Button pev(attacker,pev_button),OldButton pev(attacker,pev_oldbuttons);
        if(
Button IN_USE && (OldButton IN_DUCK) && pev(attackerpev_flags) & FL_ONGROUND)
        {
            new 
SzVClassname[MAX_NAME_LENGTH], SzAClassname[MAX_NAME_LENGTH]

            if(
pev_valid(victim))
                
pev(victimpev_classnameSzVClassnamecharsmax(SzVClassname));

            if(
pev_valid(attacker))
                
pev(attackerpev_classnameSzAClassnamecharsmax(SzAClassname));

            if(
is_valid_player(attacker))
                
client_print attackerprint_centerSzVClassname

            
if(is_valid_player(victim))
                
client_print victimprint_centerSzAClassname

        
}
    }

__________________

Last edited by DJEarthQuake; 12-09-2022 at 09:05. Reason: tags
DJEarthQuake is offline