Raised This Month: $ Target: $400
 0% 

[ Solved ] Forward Ham_Killed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-19-2012 , 15:04   [ Solved ] Forward Ham_Killed
Reply With Quote #1

Just one question : what is the param "shouldgib" please ? I do not understand ...

Code:
#include < amxmodx > public plugin_init( ) {     register_plugin( "Who kill who ?" , "1.0" , "Aooka" );         RegisterHam( Ham_Killed , "player" , "Fw_HamKilled" , true ); } public Fw_HamKilled( victim , attacker , shouldgib ) {     new szVictim[ 36 ] , szAttacker[ 36 ];         get_user_name( victim , szVictim , charsmax( szVictim ) );     get_user_name( attacker , szAttacker , charsmax( szAttacker ) );         client_print( victim , print_center , "You ha been killed by %s" , szAttacker );     client_print( attacker , print_center , "You kill %s" , szVictim ); }

Thank you in advance !
__________________
Pawn ? Useless
Aooka is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-19-2012 , 15:16   Re: [REQ] Forward Ham_Killed
Reply With Quote #2

It is in what conditions the player should gib on death (break up in meat and bones...).
0 means that the player won't gib.
1 means that the player will gib on big damage.
2 means that the player will always gib (independantly on the damage taken).
__________________
<VeCo> is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-19-2012 , 15:20   Re: [REQ] Forward Ham_Killed
Reply With Quote #3

So i can just do :
Code:
public Fw_HamKilled( victim , attacker , 3 )

and the player always break up in meat and bones LoL !

Thanks
__________________
Pawn ? Useless
Aooka is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-19-2012 , 15:22   Re: [REQ] Forward Ham_Killed
Reply With Quote #4

PHP Code:
SetHamParamInteger(3,2
But the forward should be called as PRE.
__________________

Last edited by <VeCo>; 06-19-2012 at 15:37.
<VeCo> is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-19-2012 , 15:28   Re: [REQ] Forward Ham_Killed
Reply With Quote #5

Hum why ? Because the syntax is :
Code:
SetHamParamInteger ( which, value )
Wih = 3 // Ok because i want the third.
Value = 2 // But why 2 and not 1 , 4 , 7 etc ?

And to conclude, where can i set the native ? Because if i set it in the code the compilator his ANGRY
__________________
Pawn ? Useless
Aooka is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-19-2012 , 15:31   Re: [REQ] Forward Ham_Killed
Reply With Quote #6

It's 2 because:
Quote:
Originally Posted by <VeCo> View Post
0 means that the player won't gib.
1 means that the player will gib on big damage.
2 means that the player will always gib (independantly on the damage taken).
Just set it somewhere in the function, doesn't really matter where.
__________________

Last edited by <VeCo>; 06-19-2012 at 15:31.
<VeCo> is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-19-2012 , 15:35   Re: [REQ] Forward Ham_Killed
Reply With Quote #7

Oh yes sorry i forget it :S
Thanks

It's work fine. Thanks a lot Veco !

If anyone want it :
PHP Code:
#include < amxmodx >
#include < hamsandwich >


public plugin_init( )
{
    
register_plugin"Who kill who ?" "1.0" "Aooka" );
    
    
RegisterHamHam_Killed "player" "Fw_HamKilled" true );
}

public 
Fw_HamKilledvictim attacker souldgib )
{
    
SetHamParamInteger);
    
    new 
szVictim36 ] , szAttacker36 ];
    
    
get_user_namevictim szVictim charsmaxszVictim ) );
    
get_user_nameattacker szAttacker charsmaxszAttacker ) );
    
    
client_printvictim print_center "You ha been killed by %s" szAttacker );
    
client_printattacker print_center "You kill %s" szVictim );

__________________
Pawn ? Useless
Aooka 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 06:09.


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