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

Display all entities on map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KrazyKat
Member
Join Date: Mar 2021
Old 04-12-2022 , 05:40   Display all entities on map
Reply With Quote #1

Can anyone create a plugin to display all entities (triggers, func, etc) on a map using a command that only shows the entities to that player (in different colors)?
KrazyKat is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 04-12-2022 , 11:30   Re: Display all entities on map
Reply With Quote #2

Here's one of the sort. Have to be admin to see more than a few items. Works off aiming or looking not console command and has color change.

Code:
#include amxmodx #include amxmisc #include fakemeta #define get_user_model(%1,%2,%3) engfunc( EngFunc_InfoKeyValue, engfunc( EngFunc_GetInfoKeyBuffer, %1 ), "model", %2, %3 ) static sModel[MAX_PLAYERS]; public plugin_init()     register_plugin("All HP","1.0","SPiNX"); public client_putinserver(id)     set_task(0.1,"fw_PlayerPostThink",id,.flags="b") public client_disconnected(id)     remove_task(id) public fw_PlayerPostThink(id) {     if(is_user_connected(id))     {         static ent,bh         static classname[MAX_NAME_LENGTH],color[3]         get_user_aiming(id,ent,bh)         if(!ent)             return         new health = pev(ent,pev_health)         new health_max = pev(ent,pev_max_health)         is_user_connected(ent) ?             get_user_name(ent,classname,charsmax(classname)) :             pev(ent,pev_classname,classname,charsmax(classname))         new armor = pev(ent,pev_armorvalue)         if(health)         {             new reclass[MAX_NAME_LENGTH]             if(is_user_bot(ent))                 reclass = "^n^n(bot)"             if(is_user_alive(ent) && !is_user_bot(ent))                 reclass = "^n^n(human)"               get_user_model(ent, sModel, charsmax( sModel ) );             if(!equal(sModel,""))                 formatex(classname,charsmax(classname), "%s%s%s" ,classname,reclass,sModel)             else             {                 pev(ent,pev_message,sModel,charsmax(sModel))                 //new other = pev(ent,pev_waterlevel) //last number could be 4 digit, 3 is submerged,2 partial,1 surface, 0 not in water                 //formatex(classname,charsmax(classname), "%s^n^n%s^nmax hp %i" ,classname, sModel, other)             }               switch(health)             {                 case 1..10:   color = {255,0,0}    //red                 case 11..25:  color = {255,255,0}  //yellow                 case 26..50:  color = {255,165,0}  //orange                 case 51..100: color = {0,255,0}    //green                 case 101..1000:color = {120,0,128} //purple                 default: return             }             set_hudmessage(color[0], color[1], color[2], -1.0, 0.60, 1, 1.0, 0.4, 0.01, 0.01, -1)             if(health_max)             {                            armor ? show_hudmessage(id,"%s^n^nhealth %i/%i^n^narmor %i",classname, health, health_max, armor)                 :                 show_hudmessage(id,"%s^n^nhealth %i/%i",classname, health, health_max)             }             else             {                 armor ? show_hudmessage(id,"%s^n^nhealth %i^n^narmor %i",classname, health, armor)                 :                 show_hudmessage(id,"%s^n^nhealth %i",classname, health)             }         }         else         {             color = {120,0,128}             set_hudmessage(color[0], color[1], color[2], -1.0, 0.60, 1, 1.0, 0.4, 0.01, 0.01, -1)             if(is_user_admin(id))                 show_hudmessage(id,"%s",classname)         }     } }
__________________
DJEarthQuake is offline
KrazyKat
Member
Join Date: Mar 2021
Old 04-13-2022 , 01:57   Re: Display all entities on map
Reply With Quote #3

Thank you DJEarthquake, but aside from a few compilation errors that I was able to fix, this seems to show colored HUDs with HP/Armor of the player aimed at, and not show entities across the map.
KrazyKat is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 04-13-2022 , 09:36   Re: Display all entities on map
Reply With Quote #4

If ent does not have HP it shows it without HP, all ents. What you are seeing is typical of non-admin or Counter-strike maps where there is nothing compared to HL in terms of ent variety.

Entity info might be better for your needs.
..::[Entity Info]::.. (SPiNZZaHuT)

There are approved ent programs as well.
__________________

Last edited by DJEarthQuake; 04-13-2022 at 09:47.
DJEarthQuake is offline
KrazyKat
Member
Join Date: Mar 2021
Old 04-14-2022 , 23:33   Re: Display all entities on map
Reply With Quote #5

Quote:
Originally Posted by DJEarthQuake View Post
If ent does not have HP it shows it without HP, all ents. What you are seeing is typical of non-admin or Counter-strike maps where there is nothing compared to HL in terms of ent variety.

Entity info might be better for your needs.
..::[Entity Info]::.. (SPiNZZaHuT)

There are approved ent programs as well.
I wanted something like this: Entity Lab, but it should show all entities instead of one with a laser.

I wanted to see the entities colored or atleast their borders colored. The closest I could find was from a kz server but it's lan only: Entity Highlighter
KrazyKat is offline
KrazyKat
Member
Join Date: Mar 2021
Old 04-17-2022 , 03:53   Re: Display all entities on map
Reply With Quote #6

Any help?
KrazyKat is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 04-17-2022 , 06:18   Re: Display all entities on map
Reply With Quote #7

There are maps with thousands of entities. What is the purpose of displaying all of them at once please?
__________________
DJEarthQuake is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-17-2022 , 19:37   Re: Display all entities on map
Reply With Quote #8

Lucky for you, i already made such thing while i was wondering how people make stuff in some maps, there you go ill be happy to share it with you, the plugin will basically display some entities in player's potential view sight.

Say /checkents to activate the feature.

Spoiler
__________________
@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
KrazyKat
Member
Join Date: Mar 2021
Old 04-21-2022 , 06:34   Re: Display all entities on map
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
Lucky for you, i already made such thing while i was wondering how people make stuff in some maps, there you go ill be happy to share it with you, the plugin will basically display some entities in player's potential view sight.

Say /checkents to activate the feature.

Spoiler
Thank you so much Natsheh, you're amazing! I love your jailbreak plugin too, great job making it, love you <3
KrazyKat 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 16:14.


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