Raised This Month: $ Target: $400
 0% 

Detecting attack2 with c4


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 08-05-2009 , 09:36   Detecting attack2 with c4
Reply With Quote #1

Is there some reason why Ham_Weapon_SecondaryAttack isn't called with weapon_c4? Since I think it isn't possible to do with that, I were hoping there would be a better way than checking players current weapon and buttons in cmdstart.
SnoW is offline
Send a message via MSN to SnoW
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-05-2009 , 09:46   Re: Detecting attack2 with c4
Reply With Quote #2

Because there is not a secondary attack for this weapon.
__________________
Arkshine is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 08-05-2009 , 09:52   Re: Detecting attack2 with c4
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
Because there is not a secondary attack for this weapon.
That shouldn't matter. It's called for example for hegrenade even it doesn't have secondary attack action either.
SnoW is offline
Send a message via MSN to SnoW
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-05-2009 , 12:12   Re: Detecting attack2 with c4
Reply With Quote #4

It does matter, it means that in the code for the C4 weapon, there is not secondary attack. Edit :

Code:
CC4::Deploy(void)                                                              
CC4::GetItemInfo(ItemInfo *)                                                
CC4::GetMaxSpeed(void)                                                         
CC4::Holster(int)                                                             
CC4::KeyValue(KeyValueData_s *)                                               
CC4::Precache(void)                                                            
CC4::PrimaryAttack(void)                                                       
CC4::Spawn(void)
CC4::Use(CBaseEntity *,CBaseEntity *,USE_TYPE,float)                       
CC4::UseDecrement(void)                                                       
CC4::WeaponIdle(void)                                                          
CC4::iItemSlot(void)
The HE grenade has a secondary attack function, but it's empty, you can see:

Code:
CHEGrenade::.ShieldSecondaryFire(int,int)                                    
CHEGrenade::CanDeploy(void)                                               
CHEGrenade::CanDrop(void)                                                     
CHEGrenade::Deploy(void)                                           
CHEGrenade::GetItemInfo(ItemInfo *)                                            
CHEGrenade::GetMaxSpeed(void)                                          
CHEGrenade::Holster(int)                                                       
CHEGrenade::Precache(void)                                               
CHEGrenade::PrimaryAttack(void)                                              
CHEGrenade::ResetPlayerShieldAnim(void)                                    
CHEGrenade::SecondaryAttack(void)                                             
CHEGrenade::SetPlayerShieldAnim(void)                                   
CHEGrenade::ShieldSecondaryFire(int,int)                                  
CHEGrenade::Spawn(void)                                                 
CHEGrenade::UseDecrement(void)                                              
CHEGrenade::WeaponIdle(void)                                             
CHEGrenade::iItemSlot(void)
__________________

Last edited by Arkshine; 08-05-2009 at 12:29.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-05-2009 , 12:30   Re: Detecting attack2 with c4
Reply With Quote #5

Maybe this function exists for nade so ShieldSecondaryFire can be called then.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-05-2009 , 12:41   Re: Detecting attack2 with c4
Reply With Quote #6

Just to complete the 2 others nades for information.

Code:
CFlashbang::.ShieldSecondaryFire(int,int)                                      
CFlashbang::CanDeploy(void)           
CFlashbang::CanDrop(void)                                                      
CFlashbang::Deploy(void)                                                  
CFlashbang::GetItemInfo(ItemInfo *)                         
CFlashbang::GetMaxSpeed(void)                                               
CFlashbang::Holster(int)                                         
CFlashbang::IsPistol(void)                                              
CFlashbang::Precache(void)                                            
CFlashbang::PrimaryAttack(void)                                            
CFlashbang::ResetPlayerShieldAnim(void)                             
CFlashbang::SecondaryAttack(void)                           
CFlashbang::SetPlayerShieldAnim(void)                               
CFlashbang::ShieldSecondaryFire(int,int)                          
CFlashbang::Spawn(void)                                          
CFlashbang::UseDecrement(void)                                    
CFlashbang::WeaponIdle(void)                                    
CFlashbang::iItemSlot(void)
Code:
CSmokeGrenade::.ShieldSecondaryFire(int,int)                                  
CSmokeGrenade::CanDeploy(void)                                             
CSmokeGrenade::CanDrop(void)                                                 
CSmokeGrenade::Deploy(void)                                                  
CSmokeGrenade::GetItemInfo(ItemInfo *)                                   
CSmokeGrenade::GetMaxSpeed(void)                                           
CSmokeGrenade::Holster(int)                                          
CSmokeGrenade::Precache(void)                                              
CSmokeGrenade::PrimaryAttack(void)                                           
CSmokeGrenade::ResetPlayerShieldAnim(void)                                 
CSmokeGrenade::SecondaryAttack(void)                                       
CSmokeGrenade::SetPlayerShieldAnim(void)                                       
CSmokeGrenade::ShieldSecondaryFire(int,int)                               
CSmokeGrenade::Spawn(void)                                                    
CSmokeGrenade::UseDecrement(void)                                             
CSmokeGrenade::WeaponIdle(void)                                             
CSmokeGrenade::iItemSlot(void)
So SnoW you have probably to use FM_CmdStart.
__________________
Arkshine is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 08-05-2009 , 14:06   Re: Detecting attack2 with c4
Reply With Quote #7

Ye, thanks ark.
SnoW is offline
Send a message via MSN to SnoW
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 13:57.


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