AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How i use Ham_Deathnotice? (https://forums.alliedmods.net/showthread.php?t=241128)

lovenina12 05-28-2014 12:13

How i use Ham_Deathnotice?
 
Hi guys, I need a help with a scripting,
How I use Ham_Deathnotice?

in RegisterHam and ExecuteHam

is like this?:
Code:

RegisterHam(Ham_Deathnotice, "player", "fw_notice")

------------------------------------------------

public fw_notice(killer, weapon, headshot, victim)

??? '-'

How i Use Ham_Deathnotice?

Torge 05-28-2014 15:28

Re: How i use Ham_Deathnotice?
 
Here a few examples how it could look like:

PHP Code:

public fw_notice(killerweaponheadshotvictim)
{
         if(
is_user_alive(killer)) // bla bla
         
         
...

         new 
weapon get_user_weapon(killer); // bla bla

         
...

         if(
weapon == CSW_M4A1// bla bla



lovenina12 05-28-2014 15:48

Re: How i use Ham_Deathnotice?
 
Quote:

Originally Posted by lovenina12 (Post 2143589)
Hi guys, I need a help with a scripting,
How I use Ham_Deathnotice?

in RegisterHam and ExecuteHam

is like this?:
Code:

RegisterHam(Ham_Deathnotice, "player", "fw_notice")

------------------------------------------------

public fw_notice(killer, weapon, headshot, victim)

??? '-'

How i Use Ham_Deathnotice?

Sry Bad English *

@Torge

No, no, i need to know how is the code.
( This Part "public fw_notice(killer, weapon, headshot, victim)")
Is only an example. IDK how it really is, and this is my question. How it is? The codes after the CallBack?

jimaway 05-29-2014 06:46

Re: How i use Ham_Deathnotice?
 
/**
* Description: Typically called when an entity dies to notify any children entities about the death.
* Forward params: function(this, idchild)
* Return type: None.
* Execute params: ExecuteHam(Ham_DeathNotice, this, idchild)
*/
Ham_DeathNotice,

lovenina12 05-29-2014 12:29

Re: How i use Ham_Deathnotice?
 
What is "idchild"?

aron9forever 05-29-2014 13:35

Re: How i use Ham_Deathnotice?
 
Quote:

Originally Posted by lovenina12 (Post 2144043)
What is "idchild"?

Quote:

Originally Posted by jimaway (Post 2143900)
/**
* Description: Typically called when an entity dies to notify any children entities about the death.
* Forward params: function(this, idchild)
* Return type: None.
* Execute params: ExecuteHam(Ham_DeathNotice, this, idchild)
*/
Ham_DeathNotice,


meTaLiCroSS 05-30-2014 01:02

Re: How i use Ham_Deathnotice?
 
This function it's actually empty and never called on the engine, so don't waste trying to know it's work.

Also, HLSDK saids:

Quote:

monster maker children use this to tell the monster maker that they have died.
Note: It's not the same CBaseEntity::DeathNotice with CHalfLifeMultiplay::DeathNotice, ...


All times are GMT -4. The time now is 09:47.

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