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

Killling Bomber


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ashwink7
Junior Member
Join Date: Feb 2014
Old 08-28-2014 , 07:44   Killling Bomber
Reply With Quote #1

In Death event i want to find whether Victim had c4 Before dying and droped it or not i trid using get_user_weapon bt dat doesnt work since after dying c4 is dropped so how to find whether he had c4 or not becaus if he had then i will give bonus hp to Killer for killing c4 holder
ashwink7 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-28-2014 , 07:46   Re: Killling Bomber
Reply With Quote #2

Take a look at this
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
ashwink7
Junior Member
Join Date: Feb 2014
Old 08-28-2014 , 08:04   Re: Killling Bomber
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
I know but in this it doesnt show how to find is the given player HAD C4 it only shows how to find is the given player HAVE C4 I want to find is the given player Had C4 before dying or not
ashwink7 is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-28-2014 , 08:15   Re: Killling Bomber
Reply With Quote #4

Hook Ham_Touch and check if the entity's classname is weapon_c4. Use a bool, and if the player picked up a C4, set it to true. You can use that logevent and get user's index by VEN's stock to detect player dropped the bomb:
PHP Code:
// Bomb dropped (including disconnect/death) event
    
register_logevent("logevent_function_p"3"2=Dropped_The_Bomb"
Just set the bool to false here. And on player death check if the bool is true, therefore the player was having a c4 in him.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-28-2014 , 08:24   Re: Killling Bomber
Reply With Quote #5

Quote:
Originally Posted by Flick3rR View Post
Hook Ham_Touch and check if the entity's classname is weapon_c4. Use a bool, and if the player picked up a C4, set it to true. You can use that logevent and get user's index by VEN's stock to detect player dropped the bomb:
PHP Code:
// Bomb dropped (including disconnect/death) event
    
register_logevent("logevent_function_p"3"2=Dropped_The_Bomb"
Just set the bool to false here. And on player death check if the bool is true, therefore the player was having a c4 in him.
Ham_Touch is not the proper solution for detecting c4 added to player. Hook AddPlayerItem instead or even WeaponPickup event if you would like to know when a player pickup it, but I would recommend the first one
__________________

Last edited by HamletEagle; 08-28-2014 at 08:25.
HamletEagle is offline
ashwink7
Junior Member
Join Date: Feb 2014
Old 08-28-2014 , 08:27   Re: Killling Bomber
Reply With Quote #6

Quote:
Originally Posted by Flick3rR View Post
Hook Ham_Touch and check if the entity's classname is weapon_c4. Use a bool, and if the player picked up a C4, set it to true. You can use that logevent and get user's index by VEN's stock to detect player dropped the bomb:
PHP Code:
// Bomb dropped (including disconnect/death) event
    
register_logevent("logevent_function_p"3"2=Dropped_The_Bomb"
Just set the bool to false here. And on player death check if the bool is true, therefore the player was having a c4 in him.
Thanks a lot dint thought of this will try it
ashwink7 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-28-2014 , 08:27   Re: Killling Bomber
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
Ham_Touch is not the proper solution for detecting c4 added to player. Hook AddPlayerItem instead or even WeaponPickup event if you would like to know when a player pickup it, but I would recommend the first one
__________________
HamletEagle is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-28-2014 , 09:07   Re: Killling Bomber
Reply With Quote #8

Also detect the logevent for spawning with bomb and set the bool to true, because the user may be spawned with the bomb and someone to kill him without dropping/picking up.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-28-2014 , 09:26   Re: Killling Bomber
Reply With Quote #9

Quote:
Originally Posted by Flick3rR View Post
Also detect the logevent for spawning with bomb and set the bool to true, because the user may be spawned with the bomb and someone to kill him without dropping/picking up.
If he hook AddPlayerItem this is not needed.
__________________
HamletEagle 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 01:38.


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