Raised This Month: $ Target: $400
 0% 

How to use the ham_killed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MouseSplash!
Veteran Member
Join Date: Dec 2009
Location: En Tu Mente!
Old 12-25-2009 , 19:35   How to use the ham_killed
Reply With Quote #1

hi everyone can help me
i need 1 tutorial for ham_killed , and ham_take damage
and others :S!

thx
MouseSplash! is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-25-2009 , 22:03   Re: How to use the ham_killed
Reply With Quote #2

PHP Code:
RegisterHam(Ham_Killed"player""Player_Death"0/1before death 1 after 
PHP Code:
public Player_Death(id)
{
    
//Player Death

To register Bots so that they are affected by your ham sandwich forwards
PHP Code:
new bool:gBotsRegistered;

public 
client_authorizedid )
{
    if( !
gBotsRegistered && is_user_botid ) )
    {
        
set_task0.1"register_bots"id );
    }
}

public 
register_botsid )
{
    if( !
gBotsRegistered && is_user_connectedid ) )
    {
        
RegisterHamFromEntityHam_Killedid"Player_Death"); // This should look identical to the RegisterHam in the plugin init
        
gBotsRegistered true;
    }


Last edited by Doc-Holiday; 12-25-2009 at 22:05.
Doc-Holiday is offline
MouseSplash!
Veteran Member
Join Date: Dec 2009
Location: En Tu Mente!
Old 12-26-2009 , 03:23   Re: How to use the ham_killed
Reply With Quote #3

PHP Code:
RegisterHam(Ham_Killed"player""Player_Death"0/1before death 1 after 

PHP Code:
public Player_Death(id)
{
    
//Player Death
   // give me here 1 example more complete pls ! :D




MouseSplash! is offline
Hasler
BANNED
Join Date: Jul 2009
Location: Argentina, Rosario
Old 12-26-2009 , 04:19   Re: How to use the ham_killed
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init() {
    
register_plugin("ham_killed example""1.4""Hasler")
    
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
}

 public 
fw_PlayerKilled(victimattackershouldgib)
{
      static 
namevictim[33]
      
get_user_name(victimnamevictim32)
      new 
aName[32]
      
get_user_name(attackeraNamesizeof(aName)-1)
 
      if(
get_user_team(attacker) == 1)
            
client_print(0print_chat"%s kill %s",aName,namevictim)

Hasler is offline
MouseSplash!
Veteran Member
Join Date: Dec 2009
Location: En Tu Mente!
Old 12-26-2009 , 07:11   Re: How to use the ham_killed
Reply With Quote #5

thx +k
MouseSplash! is offline
Old 08-07-2013, 02:38
LordOfNothing
This message has been deleted by Arkshine. Reason: Unnecessary post.
Old 08-07-2013, 03:09
wickedd
This message has been deleted by Arkshine. Reason: Unnecessary post.
Reply


Thread Tools
Display Modes

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 04:17.


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