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

Forward >"<....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 07-27-2009 , 21:10   Forward >"<....
Reply With Quote #1

What fakemeta\hamsandwich forwards used when :
1) A player is killed
2) Player is holding a weapon..

I really don't know about this . Thanks in advance
__________________
5c0r-|3i0 is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 07-27-2009 , 21:15   Re: Forward >"<....
Reply With Quote #2

1. Ham_Killed
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-27-2009 , 21:37   Re: Forward >"<....
Reply With Quote #3

Are fakemeta and\or hamsandwich required? Because both can be done without using either.
__________________
Bugsy is offline
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 07-27-2009 , 21:45   Re: Forward >"<....
Reply With Quote #4

@Bugsy:'kay..tell me another method .
@TitANious:
Show me an example
5c0r-|3i0 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-27-2009 , 23:36   Re: Forward >"<....
Reply With Quote #5

PHP Code:
#include <amxmodx>

public plugin_init() 
{
    
register_plugin"Weapon and Kill" "1.0" "bugsy" );
    
register_event"CurWeapon" "fw_EvCurWeapon" "be" "1=1" );
    
register_event"DeathMsg" "fw_EvDeathMsg" "a" );
}

public 
fw_EvCurWeaponid )
{
    static 
iWeapon iPrevWeapon;
    static 
szWeapon20 ];
    
    
iWeapon read_data);
    
    if ( 
iWeapon != iPrevWeapon )
    {
        
get_weaponnameiWeapon szWeapon 19 );
        
client_printid print_chat "* You are now using %s" szWeapon] );
        
iPrevWeapon iWeapon;
    }
}

public 
fw_EvDeathMsg( )
{
    static 
iKilleriKiller read_data);
    static 
iVictimiVictim read_data);
    static 
iWasHeadshotiWasHeadshot read_data);
    static 
szWeaponUsed20 ]; read_dataszWeaponUsed 19 );
    static 
szKiller33 ] , szVictim33 ];
    
    
//You could also perform this if-statement via adding condition in the register_event function
    //which will make it only be called if a player kills another player [not called on suicide\slay etc]
    //register_event( "DeathMsg" , "fw_EvDeathMsg" , "a" , "1>0" , "2>0" );
    
if ( iKiller && iVictim )
    {
        
get_user_nameiKiller szKiller 32 );
        
get_user_nameiVictim szVictim 32 );
    
        
client_printprint_chat "* %s killed %s with %s%s" szKiller szVictimszWeaponUsed iWasHeadshot " [HEADSHOT]" "" );
    }

__________________
Bugsy is offline
Old 07-27-2009, 23:37
fysiks
This message has been deleted by fysiks. Reason: mmm . . . my answer wasonly have that :)
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 07-27-2009 , 23:52   Re: Forward >"<....
Reply With Quote #6

I was wrong .haha =)) . I think that I have to use cstrike modules when use those 2 events .Thanks a lot
5c0r-|3i0 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-27-2009 , 23:58   Re: Forward >"<....
Reply With Quote #7

cstrike module is not needed.
__________________
Bugsy 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 02:55.


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