SendDeathInfo: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome| desc=.| params=<syntaxhighlight lang="lua">( weaponId, killerId, bodypartId )</syntaxhighlight> <poem>::weaponId : The same as weapon IDs on server side. ::killerI...")
 
No edit summary
Line 1: Line 1:
{{Welcome|
{{Welcome|
desc=.|
desc=This sends packet to server so that server treats npc as killed ( by a player ) and shows the death message.|
params=<syntaxhighlight lang="lua">( weaponId, killerId, bodypartId )</syntaxhighlight>
params=<syntaxhighlight lang="lua">( weaponId, killerId, bodypartId )</syntaxhighlight>
<poem>::weaponId : The same as weapon IDs on server side.  
<poem>::weaponId : The same as weapon IDs on server side.  
::killerId : The ID of the killer who 'killed' the npc.
::killerId : The ID of the killer who 'killed' the npc.
bodypartId : The [[bodypart]] the npc was hit.</poem>|
::bodypartId : The [[bodypart]] the npc was hit.</poem>|
retvals=This function does not return any specific values.|
retvals=This function does not return any specific values.|
example=<source lang="lua">
example=<source lang="lua">

Revision as of 04:27, 20 November 2022


Description:
This sends packet to server so that server treats npc as killed ( by a player ) and shows the death message.


Parameters:

( weaponId, killerId, bodypartId )

weaponId : The same as weapon IDs on server side.
killerId : The ID of the killer who 'killed' the npc.
bodypartId : The bodypart the npc was hit.


Return Values:
This function does not return any specific values.


Example

function Kill()
{
	SendDeathInfo( 70, 255, 0 ); // 70 means /kill
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.