Raised This Month: $ Target: $400
 0% 

public weapon_event()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 07-29-2008 , 12:02   public weapon_event()
Reply With Quote #1

I need some help with teh weapon_event
I need to find when a player shoots their weapon and shoots a player (successfully and unsuccessfully)

I guess there would both use weapon_event, but im not sure how to register_event("CurWeapon", "..........) properly for each

Any help would be awesome!
__________________
minimiller is offline
Send a message via MSN to minimiller
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 07-29-2008 , 13:15   Re: public weapon_event()
Reply With Quote #2

The best way i think that it is with fakemeta ->

PHP Code:
public plugin_init()
{
    
register_forward(FM_TraceLine"fw_traceline")
}

public 
fw_traceline(Float:start[3], Float:end[3], conditionsidtr)
{
    if (!
is_user_alive(id)) return FMRES_IGNORED
    
new target get_tr2(trTR_pHit)
    
    if (!
is_user_alive(target))
        
client_print(0,print_chat,"MISSED LOSER!!! :P")
    else
        
client_print(0,print_chat,"GOOD SHOT!!!")

    return 
FMRES_IGNORED

__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 07-29-2008 , 13:47   Re: public weapon_event()
Reply With Quote #3

Ok thanks, ill try it
+karma for yoooouu
__________________
minimiller is offline
Send a message via MSN to minimiller
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-29-2008 , 19:56   Re: public weapon_event()
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?t=54887
http://forums.alliedmods.net/showthread.php?t=49395
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 07-30-2008 , 03:16   Re: public weapon_event()
Reply With Quote #5

You're right! I forgot about those tutorials. I've tested the traceline and it is good when you don't shot through walls
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 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 05:33.


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