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

bomb for CT on the radar


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
anakonda001
Member
Join Date: Jul 2020
Old 08-23-2020 , 13:56   bomb for CT on the radar
Reply With Quote #1

looking for a plugin that shows for CT where the bomb is on the radar
anakonda001 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-23-2020 , 14:26   Re: bomb for CT on the radar
Reply With Quote #2

Try this?

https://forums.alliedmods.net/showpo...5&postcount=11
__________________
Bugsy is offline
anakonda001
Member
Join Date: Jul 2020
Old 08-23-2020 , 14:38   Re: bomb for CT on the radar
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
it doesn't show anything
anakonda001 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-23-2020 , 16:01   Re: bomb for CT on the radar
Reply With Quote #4

Try this. Mostly untested

PHP Code:

#include <amxmodx>
#include <engine>
#include <fakemeta>

new const Version[] = "0.2";

const 
BombTaskID 91233592;

new 
msgHostagePos msgHostageK;

public 
plugin_init( ) 
{
    
register_plugin"Bomb on CT Radar"Version "bugsy" );
    
    
msgHostagePos get_user_msgid"HostagePos" );
    
msgHostageK get_user_msgid"HostageK" );
    
    
register_logevent"BombDropped" "2=Dropped_The_Bomb" );
    
register_logevent"BombPlanted" "2=Planted_The_Bomb" );
    
register_logevent"BombPlanted" "1=Round_End" );
}

public 
BombDropped()
{
    
set_task0.1 "RadarDelay" );
}

public 
RadarDelay()
{
    new 
iWeaponboxEntity Float:fWeaponboxOrigin];
    
    
iWeaponboxEntity find_ent_by_modelFM_NULLENT "weaponbox" "models/w_backpack.mdl" );
    
    if ( 
pev_validiWeaponboxEntity ) ) 
    {
        
entity_get_vectoriWeaponboxEntity EV_VEC_origin fWeaponboxOrigin );
        
set_task1.0 "ShowOnRadar" BombTaskID fWeaponboxOrigin sizeoffWeaponboxOrigin ) , "b" );
    }
}

public 
BombPlanted() 
{
    
remove_taskBombTaskID );
}

public 
ShowOnRadarFloat:fWeaponboxOrigin] , iTaskID 
{    
    new 
iPlayers32 ] , iNum iPlayer;
    
    
get_playersiPlayers iNum "ce" "CT" );
    
    for ( new 
iNum i++ )
    {
        
iPlayer iPlayers];
        
        
message_beginMSG_ONE_UNRELIABLE msgHostagePos , .player=iPlayer );
        
write_byteiPlayer );
        
write_byteiPlayer );
        
engfuncEngFunc_WriteCoord fWeaponboxOrigin] );
        
engfuncEngFunc_WriteCoord fWeaponboxOrigin] );
        
engfuncEngFunc_WriteCoord fWeaponboxOrigin] );
        
message_end();
        
        
message_beginMSG_ONE_UNRELIABLE msgHostageK , .player=iPlayer );
        
write_byteiPlayer );
        
message_end();
    }

__________________

Last edited by Bugsy; 08-23-2020 at 22:19.
Bugsy is offline
anakonda001
Member
Join Date: Jul 2020
Old 08-23-2020 , 16:18   Re: bomb for CT on the radar
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
Try this. Mostly untested
PHP Code:

#include <amxmodx>
#include <engine>
#include <fakemeta>

new const Version[] = "0.1";

const 
BombRadarID 91233592;

new 
msgHostagePos msgHostageK;

public 
plugin_init( ) 
{
    
register_plugin"Bomb on CT Radar"Version "bugsy" );
    
    
msgHostagePos get_user_msgid"HostagePos" );
    
msgHostageK get_user_msgid"HostageK" );
    
    
register_logevent"BombDropped" "2=Dropped_The_Bomb" );
    
register_logevent"BombPlanted" "2=Planted_The_Bomb" );
}

public 
BombDropped( )
{
    
set_task0.5 "RadarDelay" );
}

public 
RadarDelay()
{
    new 
iBomb find_ent_by_modelFM_NULLENT "weaponbox" "models/w_backpack.mdl" );
    
    
set_task1.0 "ShowOnRadar" BombRadarID+iBomb , .flags="b" );
}

public 
BombPlanted() 
{
    
remove_taskBombRadarID );
}

public 
ShowOnRadariEntity 
{    
    new 
Float:fOrigin] , iPlayers32 ] , iNum iPlayer;
    
    
iEntity -= BombRadarID;
    
    
entity_get_vectoriEntity EV_VEC_origin fOrigin );
    
get_playersiPlayers iNum "ce" "CT" );
    
    for ( new 
iNum i++ )
    {
        
iPlayer iPlayers];
        
        
message_beginMSG_ONE_UNRELIABLE msgHostagePos , .player=iPlayer);
        
write_byteiPlayer );
        
write_byteiPlayer );
        
engfuncEngFunc_WriteCoord fOrigin] );
        
engfuncEngFunc_WriteCoord fOrigin] );
        
engfuncEngFunc_WriteCoord fOrigin] );
        
message_end();
        
        
message_beginMSG_ONE_UNRELIABLE msgHostageK , .player=iPlayer );
        
write_byteiPlayer );
        
message_end();
    }

1) in some rounds it doesn't show
2) can I change the flashing color for CT to blue

Last edited by anakonda001; 08-23-2020 at 16:46.
anakonda001 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-23-2020 , 19:02   Re: bomb for CT on the radar
Reply With Quote #6

1. The above code is fixed.
2. It's not possible to change the blip color. The bomb radar blip is utilizing the hostage radar display which doesn't allow you to modify the color.
__________________
Bugsy is offline
anakonda001
Member
Join Date: Jul 2020
Old 08-24-2020 , 04:14   Re: bomb for CT on the radar
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
1. The above code is fixed.
2. It's not possible to change the blip color. The bomb radar blip is utilizing the hostage radar display which doesn't allow you to modify the color.
now it doesn't work at all
anakonda001 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-24-2020 , 18:27   Re: bomb for CT on the radar
Reply With Quote #8

It's working fine for me. Are you getting any errors?
__________________
Bugsy is offline
anakonda001
Member
Join Date: Jul 2020
Old 08-25-2020 , 11:51   Re: bomb for CT on the radar
Reply With Quote #9

Quote:
Originally Posted by Bugsy View Post
It's working fine for me. Are you getting any errors?
1)there are no errors, but the plugin doesn't work
2)here is on one server saw blue is ablaze bomb have CT and for TT red
Attached Thumbnails
Click image for larger version

Name:	Безымянный.png
Views:	45
Size:	44.0 KB
ID:	183387  
anakonda001 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-25-2020 , 18:48   Re: bomb for CT on the radar
Reply With Quote #10

To confirm, this plugin will show a red dot on the radar, for CT's, for a dropped bomb only.
__________________

Last edited by Bugsy; 08-25-2020 at 18:48.
Bugsy 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 02:14.


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