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

Bomb/Death/CSS Radar


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-02-2011 , 05:05   Re: Bomb/Death/CSS Radar
Reply With Quote #11

About : I readlly don't have a clue how to name this pdata and value related to it, the offset is named by default m_bIsC4. 1<<8 exists because sometimes when you divide the offset by its type (int, short, etc..) it does not give an integer value, that's why there is a flag (generally 1<<0 or 1<<. So, a name would be m_fGrenade and (1<< IS_C4.

About send_bomb_location(), I would like you explain why you send 2 times the messages.

Anyway about the code, it seems acceptable.
__________________
Arkshine is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 02-02-2011 , 05:34   Re: Bomb/Death/CSS Radar
Reply With Quote #12

So it's:
PHP Code:
#define m_bIsC4 96
#define IS_C4   (1<<8)
//#define m_fGrenade 114 // my code doesn't use this one 
?

Also about sending twice, do you mean this part of the code:
PHP Code:

            message_begin
(MSG_TYPEg_iMsgId_HostagePos_iPlrId);
            
write_byte(1);
            
write_byte(RADARID_OFFSET);
            
engfunc(EngFunc_WriteCoordfOrigin[0]);
            
engfunc(EngFunc_WriteCoordfOrigin[1]);
            
engfunc(EngFunc_WriteCoordfOrigin[2]);
            
message_end();
            
            
message_begin(MSG_TYPEg_iMsgId_HostageK_iPlrId);
            
write_byte(RADARID_OFFSET);
            
message_end();
            
            
message_begin(MSG_TYPEg_iMsgId_HostageK_iPlrId);
            
write_byte((RADARID_OFFSET-1));
            
message_end();
            
            
message_begin(MSG_TYPEg_iMsgId_HostagePos_iPlrId);
            
write_byte(0);
            
write_byte((RADARID_OFFSET-1));
            
engfunc(EngFunc_WriteCoordfOrigin[0]);
            
engfunc(EngFunc_WriteCoordfOrigin[1]);
            
engfunc(EngFunc_WriteCoordfOrigin[2]);
            
message_end(); 
? If yes - answer is simple. You see, when you send HostagePos and then HostageK, than dot on radar is red, and is blinking for about 2 seconds, and then just goes away. This method I am using for notification of player deaths (red blinking dot). Now comes the confusing part...

Terrorists can see only HostageK message on the radar - they can't see the original HostagePos (blue dot) message. However CTs can see the blue dot on their radar. So, cause red dot is already used by teammate death, I need a new color on the radar. However only way to remove blue dot is by fullupdate, or HostageK (what makes it red). That's why I came up with a good solution - by sending HostagePos, HostageK, and HostagePos (for an other ID this one), result will be that dot will blink not in red or blue, but in 3 colors at once (red, blue, but mostly purple/pink). So in result people won't get confused is that a c4 over there, or a teammate died.

Ya, it's confusing... Easier way to answer your question is: this method allows CTs to see a different color dot on the radar, so people wont get confused is it C4 or death of a teammate. NOTE: This method doesn't work for terrorists.

P.S. What's the offset name for 114 player team? It's not here, and it's not here... =P
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-02-2011 , 05:38   Re: Bomb/Death/CSS Radar
Reply With Quote #13

114 would be more m_iGrenadeId or m_iGrenadeType something like. Using m_bIsC4 & IS_C4 is acceptable too. Choose what you want, there is not known reference for that.

Thanks for the explanation.

Waiting some feedbacks the new version is working and I guess it will be approved.
__________________
Arkshine is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 02-02-2011 , 05:50   Re: Bomb/Death/CSS Radar
Reply With Quote #14

No, I mean 114 for "player" entity - it's cs_[s]get_user_team() thing - I was not able to find the offset name of it. Once will have it - will update.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-02-2011 , 05:51   Re: Bomb/Death/CSS Radar
Reply With Quote #15

114 = m_iTeam
__________________
Arkshine is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 02-02-2011 , 10:52   Re: Bomb/Death/CSS Radar
Reply With Quote #16

Updated to 1.2
Changed: Optimized the code (changed pdata offset names).
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-26-2011 , 06:13   Re: Bomb/Death/CSS Radar
Reply With Quote #17

I guess it's ok. Approved.
__________________
Arkshine is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 01-01-2013 , 16:30   Re: Bomb/Death/CSS Radar
Reply With Quote #18

Is this code better than yours if i need only to show dead teammates in radar?

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

public plugin_init() set_task(115.0,"load")

public 
load()
{
register_plugin"Show dead (by red stripe) in radar""-""-" );
RegisterHamHam_Killed"player""ham_Killed_Post");
}

public 
ham_Killed_PostidAttackershouldgib )
{
    new 
Float:flLocation];
    
pevidpev_originflLocation );
    new 
players32 ], numplayer;
    
get_playersplayersnum );
    for( new 
num ++ )
    {
        
player players];
        if( 
get_user_teamplayer ) != get_user_teamid ) || !is_user_aliveplayer ) )
        continue;
            
        
message_beginMSG_ONE_UNRELIABLEget_user_msgid"HostagePos" ), { 00}, player );
        
write_byteplayer );
        
write_byteid )    ;    
        
engfuncEngFunc_WriteCoordflLocation] );
        
engfuncEngFunc_WriteCoordflLocation] );
        
engfuncEngFunc_WriteCoordflLocation] );
        
message_end();
                
        
message_beginMSG_ONE_UNRELIABLEget_user_msgid"HostageK" ), { 00}, player );
        
write_byteid );
        
message_end();
    }


Last edited by Mofforg; 01-01-2013 at 16:33.
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 01-01-2013 , 16:48   Re: Bomb/Death/CSS Radar
Reply With Quote #19

Might be glitchy in some scenarios.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 01-01-2013 , 18:16   Re: Bomb/Death/CSS Radar
Reply With Quote #20

Umm? Why? Installed a year already on few servers. No crashed, no seg fault. It looks like that all dead players are displayed.

Last edited by Mofforg; 01-01-2013 at 18:22.
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
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 09:53.


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