Raised This Month: $ Target: $400
 0% 

Who break my breakable ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
solidsnake
Member
Join Date: Jul 2006
Old 02-16-2007 , 11:41   Who break my breakable ?
Reply With Quote #1

Dears friends,

I have a little trouble with func_breakable.

I'm able to set if a breakable is dead with register_think, but how to get the player that we destroy this breakable ?

i've tried : read_data, EV_ENT_dmg_inflictor,
EV_ENT_enemy,
EV_ENT_aiment

without sucess.

read_data 0 return a number but no always the good player
read_data 1 return always 1
read_data 2 the gun id
read_data 3 ??? i don't know but it's is not possible that is a player because this number is the same that another.

There is a solution with private read data ?

Thanks !
solidsnake is offline
Davidos
Senior Member
Join Date: Feb 2005
Old 02-16-2007 , 17:30   Re: Who break my breakable ?
Reply With Quote #2

Quote:
Originally Posted by solidsnake View Post
Dears friends,

I have a little trouble with func_breakable.

I'm able to set if a breakable is dead with register_think, but how to get the player that we destroy this breakable ?

i've tried : read_data, EV_ENT_dmg_inflictor,
EV_ENT_enemy,
EV_ENT_aiment

without sucess.

read_data 0 return a number but no always the good player
read_data 1 return always 1
read_data 2 the gun id
read_data 3 ??? i don't know but it's is not possible that is a player because this number is the same that another.

There is a solution with private read data ?

Thanks !

could it be that 0 is the first attacker and not the destroyer? Sorry I don't have knowledge of this...
Davidos is offline
Oskar
BANNED
Join Date: Jan 2007
Location: Slöinge, Falkenberg, Hal
Old 02-17-2007 , 08:22   Re: Who break my breakable ?
Reply With Quote #3

Maybe you coul'd check when players are shooting, and see if they are aiming at the breakable, and store the player id in a variable, so when the register_think detects that the breakable is destroyed, it will do whatever with the player id.
Oskar is offline
Send a message via MSN to Oskar
VEN
Veteran Member
Join Date: Jan 2005
Old 03-05-2007 , 04:53   Re: Who break my breakable ?
Reply With Quote #4

I believe that the Ham Sandwich module by sawce may help here.

EDIT: Module will not help for example if a player did throwed a grenade into the window.

Last edited by VEN; 03-05-2007 at 12:13.
VEN 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 00:42.


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