Raised This Month: $ Target: $400
 0% 

detect start defusing c4 stopped defusing c4


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-06-2007 , 22:30   detect start defusing c4 stopped defusing c4
Reply With Quote #1

how can i detect a person "stopped defusing c4"(let go of E and defusion process terminated)
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-06-2007 , 22:59   Re: detect start defusing c4 stopped defusing c4
Reply With Quote #2

Actually I don't know.

With amxx 1.8 which coming soon you may able to use ' cs_[g|s]et_c4_defusing(). '

EDIT :

I've found this VEN's tuto : http://forums.alliedmods.net/showthread.php?t=40164

I don't know if it can help you.

EDIT2 : You may able to use player data :
Quote:
#define OFFSET_DEFUSE_PLANT 193 + EXTRAOFFSET
I don't know how use that. :p ( Maybe get_pdata_int( id, 193, 5 ) )
__________________

Last edited by Arkshine; 08-06-2007 at 23:07.
Arkshine is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-06-2007 , 23:21   Re: detect start defusing c4 stopped defusing c4
Reply With Quote #3

Bomb defusion (without kit) started event
register_logevent("logevent_function_p", 3, "2=Begin_Bomb_Defuse_Without_Kit")

// Bomb defusion (with kit) started event
register_logevent("logevent_function_p", 3, "2=Begin_Bomb_Defuse_With_Kit")



// Bomb planting/defusion canceled event
register_event("BarTime", "event_function", "b", "1=0")
// you must be sure that bomb planting/defusion is in progress!

i need these events, how would i detect the person stopped defusing with "BarTime"?

Note: there are other plugins in game that uses BarTime!
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 08-07-2007 , 02:43   Re: detect start defusing c4 stopped defusing c4
Reply With Quote #4

Upon defuse start BarTime is fired with the time (in seconds) it takes to "arm" the bomb. When done (break or arming sequence finished) the event is fired with "0". The BarTime event offers no info about the success of the action. You must use the logevent to check if it was successfull.

BarTime is however inaccurate as other plugins use this event to "delay" other actions. Bomb plant usually takes 5 seconds. If this event is "shared" then the other plugins musn't use the 5 sec flag in their actions. Thus all you have to do is check the time fired with the event as a delay of "5" would always mean a bomb planting. Still if you have doubts about it then is better you don't use this event.
_Master_ is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-07-2007 , 19:57   Re: detect start defusing c4 stopped defusing c4
Reply With Quote #5

how do i grab the id out of the bartime event?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 08-08-2007 , 02:14   Re: detect start defusing c4 stopped defusing c4
Reply With Quote #6

register_event("BarTime", "BarTime_EventHandler", "be")
//
// ...
//

public BarTime_EventHandler(id)
{ // ...
}
_Master_ is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-08-2007 , 15:05   Re: detect start defusing c4 stopped defusing c4
Reply With Quote #7

the (id) would do? i though i needed to read data or something
thx
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME

Last edited by kp_uparrow; 08-08-2007 at 15:26.
kp_uparrow is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-08-2007 , 15:27   Re: detect start defusing c4 stopped defusing c4
Reply With Quote #8

i just used public bomb_defusing ( defuser ){ and bartime event
bartime event somehow is called 2 times and also on bomb drop
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow 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 07:59.


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