Raised This Month: $ Target: $400
 0% 

Determine a grenades origin at explosion AND the owner


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kraugh
Senior Member
Join Date: Jan 2006
Location: barrington, ri
Old 03-10-2006 , 20:15  
Reply With Quote #6

counter-strike grenades are a mystery!

Code:
public plugin_init() {    register_think("grenade","think_grenade"); } public think_grenade(ent) {    new hack = get_pdata_int(ent,118);    new oldhack = entity_get_int(ent,EV_INT_iuser1);    if(hack && !oldhack) {       // here comes explosion    }    entity_set_int(ent,EV_INT_iuser1,hack); }

you'll have to filter out c4 from this (they are considered grenades), but other than that it should alert one "think" (< 0.1 second) before a grenade explodes. you should also be able to grab EV_ENT_owner as usual.
__________________
"You can not restrain a fool from speaking, but nothing obliges you to listen."
Kraugh is offline
Send a message via AIM to Kraugh
 



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 20:19.


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