Raised This Month: $ Target: $400
 0% 

Detect Shooting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 05-22-2013 , 14:57   Detect Shooting
Reply With Quote #1

I want to Detect when you shoot with a deagle

This codes the detect when you press the shoot button

Tex: If you dont got any bullets and shoot it will print in the chat

I want it only to print in the chat when you shoot with a bullet

Code:
RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_deagle", "Ham_Attack" )
 
public Ham_Attack(entity)
{
 new id = pev(entity, pev_owner)
 
 if(is_user_alive(id))
 {
   ColorChat(0, GREY, "BanG!")
  }
 }
 return HAM_IGNORED
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Bos93
Veteran Member
Join Date: Jul 2010
Old 05-22-2013 , 15:18   Re: Detect Shooting
Reply With Quote #2

pev(entity, pev_owner) -> get_pdata_cbase(pEntity, 41, 4); - It is correct


check - if( !cs_get_weapon_ammo( pEntity) ) return;
__________________

Last edited by Bos93; 05-22-2013 at 15:24.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
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:28.


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