Raised This Month: $12 Target: $400
 3% 

[Request] Making The Invisible Objects Colored In Maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 11-06-2022 , 11:13   [Request] Making The Invisible Objects Colored In Maps
Reply With Quote #1

I really do not know what to call to those invisible objects. They block the passage like other walls or let players step on themself. I want to make them colored in order to see them clearly. It is possible?

Last edited by Snake.; 11-06-2022 at 11:15.
Snake. is offline
Send a message via Skype™ to Snake.
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-07-2022 , 00:40   Re: [Request] Making The Invisible Objects Colored In Maps
Reply With Quote #2

it depends if the those are brush entities or world brush ( AKA blocks with CLIP texture )

You're only allowed to modify entities rendering but world brush is unable to be modified unless you modified the map.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-07-2022 at 00:44.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Snake.
Senior Member
Join Date: Jul 2017
Old 11-07-2022 , 10:23   Re: [Request] Making The Invisible Objects Colored In Maps
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
it depends if the those are brush entities or world brush ( AKA blocks with CLIP texture )

You're only allowed to modify entities rendering but world brush is unable to be modified unless you modified the map.
Thanks for the info. Is there a code to make the entities rendering visible ?
Snake. is offline
Send a message via Skype™ to Snake.
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-07-2022 , 13:47   Re: [Request] Making The Invisible Objects Colored In Maps
Reply With Quote #4

yes you can include fakemeta library and use the native set_rendering();
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-11-2022 , 12:41   Re: [Request] Making The Invisible Objects Colored In Maps
Reply With Quote #5

The newest hook mod can change colors of objects touched if interested by CVAR. Also I used walkthroughwalls plugin for project I was on to include doors once players achieve enough frags and added a bunch of effects that temporarily yet dynamically light up 'the invisible areas' with a wrap around effect via TE_DLIGHT and TE_ELIGHT. Add whatever ents you want to the list.

Gif was from an older script I no longer use but the hook does that now. Aim hook, shoot, Changes color each time.

If you want to load up maps that way unattended, here is a sample script altering trigger hurts to make them heal or change damage rendered with pfn_keyvalue. One has to know what ent they are after. Like Natsheh said it is simply changing the rendering. I prefer the hook mod as it is fun repainting maps semi-random colors. There are many ways to do this.

Code:
/*Alter trigger_hurts*/ #tryinclude amxmodx #tryinclude engine ////////////////////////////////////////////////////////// new const Ent_of_interest[] = "trigger_hurt"     //Trigger_hurt values new const Value_to_alter1[] = "dmg" new const Value_to_alter2[] = "damagetype" ////////////////////////////////////////////////////////// const MAX_CMD_LENGTH    =   128 enum _:authors_details {     plugin[MAX_NAME_LENGTH],     version[MAX_IP_LENGTH],     author[MAX_NAME_LENGTH] } new plugin_registry[ authors_details ] new Trie:g_tHurts new ent_counter = 0 new g_heal, g_dam new tbuffer[MAX_NAME_LENGTH] new vbuffer[MAX_IP_LENGTH] new new_value1[MAX_NAME_LENGTH] new new_value2[MAX_NAME_LENGTH] new iTranslation public plugin_init() {     new hour,min,sec     time(hour,min,sec)     formatex(vbuffer,charsmax(vbuffer),"%i:%i:%i", hour, min, sec)     plugin_registry[ plugin ] = "trigger_hurts"     plugin_registry[ version ] = vbuffer     plugin_registry[ author ] = ".sρiηX҉."     set_task( 5.0, "@register", 777, plugin_registry, authors_details ) } @register() {     register_plugin     (         .plugin_name = plugin_registry[ plugin ],         .version =  plugin_registry[ version ],         .author = plugin_registry[ author ]     )     if(ent_counter)         log_amx "Altered %i trigger_hurt ents!", ent_counter } public pfn_keyvalue( ent ) {     g_heal = register_cvar("trigger_heal", "1") //-1/0|1 Toggle trigger_hurt. -1 debug. 1 hurt. 0 heal.     g_dam = register_cvar("trigger_type", "FREEZE") //Damage type. Typo defaults to generic.     new iStarter1 = get_pcvar_num(g_heal)-1 : 1     formatex(new_value1,charsmax(new_value1),"%i",iStarter1)     g_tHurts = TrieCreate( )     TrieSetCell(g_tHurts,"GENERIC",0)     TrieSetCell(g_tHurts,"CRUSH",1)     TrieSetCell(g_tHurts,"BULLET",2)     TrieSetCell(g_tHurts,"SLASH",4)     TrieSetCell(g_tHurts,"BURN",8)     TrieSetCell(g_tHurts,"FREEZE",16)     TrieSetCell(g_tHurts,"FALL",32)     TrieSetCell(g_tHurts,"BLAST",64)     TrieSetCell(g_tHurts,"CLUB",128)     TrieSetCell(g_tHurts,"SHOCK",256)     TrieSetCell(g_tHurts,"SONIC",512)     TrieSetCell(g_tHurts,"ENERGYBEAM",1024)     TrieSetCell(g_tHurts,"DROWN",16384)     TrieSetCell(g_tHurts,"PARALYSE",32768)     TrieSetCell(g_tHurts,"NERVEGAS",65536)     TrieSetCell(g_tHurts,"POISON",131072)     TrieSetCell(g_tHurts,"RADIATION",262144)     TrieSetCell(g_tHurts,"DROWNRECOVER",524288)     TrieSetCell(g_tHurts,"CHEMICAL",1048576)     TrieSetCell(g_tHurts,"SLOWBURN",2097152)     TrieSetCell(g_tHurts,"SLOWFREEZE",4194304)     get_pcvar_string(g_dam, tbuffer, charsmax(tbuffer))     if( TrieKeyExists( g_tHurts, tbuffer ) )     {         new fix_possible_typo = TrieGetCell( g_tHurts, tbuffer, iTranslation ) ? iTranslation : 0         formatex(new_value2,charsmax(new_value2),"%i",fix_possible_typo)         new Classname[  MAX_NAME_LENGTH ], key[ MAX_NAME_LENGTH ], value[ MAX_CMD_LENGTH ]         copy_keyvalue( Classname, charsmax(Classname), key, charsmax(key), value, charsmax(value) )         if(equali(Classname,Ent_of_interest))         {             if(equali(key,Value_to_alter1) && !equali(value,new_value1))             {                 if(get_pcvar_num(g_heal) < 0)                     log_amx "Attempting| %s altered to %s", Value_to_alter1, new_value1                 DispatchKeyValue(Value_to_alter1,new_value1)                 if(get_pcvar_num(g_heal) < 0)                     log_amx"Success!|%s altered to %s", Value_to_alter1, new_value1                 ent_counter++             }             if(equali(key,Value_to_alter2) && !equali(value,new_value2))             {                 if(get_pcvar_num(g_heal) < 0)                     log_amx "Attempting|change %s to %s|%s", Value_to_alter2, tbuffer, new_value2                 DispatchKeyValue(Value_to_alter2, new_value2)                 if(get_pcvar_num(g_heal) < 0)                     log_amx"Success!|%s altered to %s|%s", Value_to_alter2, tbuffer, new_value2             }         }     } }
__________________
DJEarthQuake is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 11-12-2022 , 05:32   Re: [Request] Making The Invisible Objects Colored In Maps
Reply With Quote #6

Quote:
Originally Posted by DJEarthQuake View Post
The newest hook mod can change colors of objects touched if interested by CVAR. Also I used walkthroughwalls plugin for project I was on to include doors once players achieve enough frags and added a bunch of effects that temporarily yet dynamically light up 'the invisible areas' with a wrap around effect via TE_DLIGHT and TE_ELIGHT. Add whatever ents you want to the list.

Gif was from an older script I no longer use but the hook does that now. Aim hook, shoot, Changes color each time.

If you want to load up maps that way unattended, here is a sample script altering trigger hurts to make them heal or change damage rendered with pfn_keyvalue. One has to know what ent they are after. Like Natsheh said it is simply changing the rendering. I prefer the hook mod as it is fun repainting maps semi-random colors. There are many ways to do this.

Code:
/*Alter trigger_hurts*/ #tryinclude amxmodx #tryinclude engine ////////////////////////////////////////////////////////// new const Ent_of_interest[] = "trigger_hurt"     //Trigger_hurt values new const Value_to_alter1[] = "dmg" new const Value_to_alter2[] = "damagetype" ////////////////////////////////////////////////////////// const MAX_CMD_LENGTH    =   128 enum _:authors_details {     plugin[MAX_NAME_LENGTH],     version[MAX_IP_LENGTH],     author[MAX_NAME_LENGTH] } new plugin_registry[ authors_details ] new Trie:g_tHurts new ent_counter = 0 new g_heal, g_dam new tbuffer[MAX_NAME_LENGTH] new vbuffer[MAX_IP_LENGTH] new new_value1[MAX_NAME_LENGTH] new new_value2[MAX_NAME_LENGTH] new iTranslation public plugin_init() {     new hour,min,sec     time(hour,min,sec)     formatex(vbuffer,charsmax(vbuffer),"%i:%i:%i", hour, min, sec)     plugin_registry[ plugin ] = "trigger_hurts"     plugin_registry[ version ] = vbuffer     plugin_registry[ author ] = ".sρiηX҉."     set_task( 5.0, "@register", 777, plugin_registry, authors_details ) } @register() {     register_plugin     (         .plugin_name = plugin_registry[ plugin ],         .version =  plugin_registry[ version ],         .author = plugin_registry[ author ]     )     if(ent_counter)         log_amx "Altered %i trigger_hurt ents!", ent_counter } public pfn_keyvalue( ent ) {     g_heal = register_cvar("trigger_heal", "1") //-1/0|1 Toggle trigger_hurt. -1 debug. 1 hurt. 0 heal.     g_dam = register_cvar("trigger_type", "FREEZE") //Damage type. Typo defaults to generic.     new iStarter1 = get_pcvar_num(g_heal)-1 : 1     formatex(new_value1,charsmax(new_value1),"%i",iStarter1)     g_tHurts = TrieCreate( )     TrieSetCell(g_tHurts,"GENERIC",0)     TrieSetCell(g_tHurts,"CRUSH",1)     TrieSetCell(g_tHurts,"BULLET",2)     TrieSetCell(g_tHurts,"SLASH",4)     TrieSetCell(g_tHurts,"BURN",8)     TrieSetCell(g_tHurts,"FREEZE",16)     TrieSetCell(g_tHurts,"FALL",32)     TrieSetCell(g_tHurts,"BLAST",64)     TrieSetCell(g_tHurts,"CLUB",128)     TrieSetCell(g_tHurts,"SHOCK",256)     TrieSetCell(g_tHurts,"SONIC",512)     TrieSetCell(g_tHurts,"ENERGYBEAM",1024)     TrieSetCell(g_tHurts,"DROWN",16384)     TrieSetCell(g_tHurts,"PARALYSE",32768)     TrieSetCell(g_tHurts,"NERVEGAS",65536)     TrieSetCell(g_tHurts,"POISON",131072)     TrieSetCell(g_tHurts,"RADIATION",262144)     TrieSetCell(g_tHurts,"DROWNRECOVER",524288)     TrieSetCell(g_tHurts,"CHEMICAL",1048576)     TrieSetCell(g_tHurts,"SLOWBURN",2097152)     TrieSetCell(g_tHurts,"SLOWFREEZE",4194304)     get_pcvar_string(g_dam, tbuffer, charsmax(tbuffer))     if( TrieKeyExists( g_tHurts, tbuffer ) )     {         new fix_possible_typo = TrieGetCell( g_tHurts, tbuffer, iTranslation ) ? iTranslation : 0         formatex(new_value2,charsmax(new_value2),"%i",fix_possible_typo)         new Classname[  MAX_NAME_LENGTH ], key[ MAX_NAME_LENGTH ], value[ MAX_CMD_LENGTH ]         copy_keyvalue( Classname, charsmax(Classname), key, charsmax(key), value, charsmax(value) )         if(equali(Classname,Ent_of_interest))         {             if(equali(key,Value_to_alter1) && !equali(value,new_value1))             {                 if(get_pcvar_num(g_heal) < 0)                     log_amx "Attempting| %s altered to %s", Value_to_alter1, new_value1                 DispatchKeyValue(Value_to_alter1,new_value1)                 if(get_pcvar_num(g_heal) < 0)                     log_amx"Success!|%s altered to %s", Value_to_alter1, new_value1                 ent_counter++             }             if(equali(key,Value_to_alter2) && !equali(value,new_value2))             {                 if(get_pcvar_num(g_heal) < 0)                     log_amx "Attempting|change %s to %s|%s", Value_to_alter2, tbuffer, new_value2                 DispatchKeyValue(Value_to_alter2, new_value2)                 if(get_pcvar_num(g_heal) < 0)                     log_amx"Success!|%s altered to %s|%s", Value_to_alter2, tbuffer, new_value2             }         }     } }
Thank you sir but it seems the objects i wanna edit are not entitites. So, nothing to do.
Snake. is offline
Send a message via Skype™ to Snake.
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
Reply


Thread Tools
Display Modes

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 17:59.


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