SendShotInfo: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome| desc=| This function registers to server that the npc is shot down ( by another player ). This function is followed by SendDeathInfo after a delay (must be call...")
 
No edit summary
Line 1: Line 1:
{{Welcome|
{{Welcome|
desc=| This function registers to server that the npc is shot down ( by another player ). This function is followed by [[SendDeathInfo]] after a delay (must be called after say 1000 ms )
desc=| This function registers to server that the npc is shot down ( by another player ). This function is followed by [[SendDeathInfo]] after a delay (must be called after say 1000 ms )|
params=<syntaxhighlight lang="lua">( bodypartId, animationId )</syntaxhighlight>
params=<syntaxhighlight lang="lua">( bodypartId, animationId )</syntaxhighlight>
<poem>::bodypartId : The [[bodypart]] which 'was' hit.
<poem>::bodypartId : The [[bodypart]] which 'was' hit.
Line 6: Line 6:
example=<source lang="lua">
example=<source lang="lua">
SendShotInfo( 6, 17 ); //6 means head and 17 means shot in face.
SendShotInfo( 6, 17 ); //6 means head and 17 means shot in face.
</source>|
SetTimerEx( "SendDeathInfo", 2000, 1, 27, 0, 6 );</source>|
relfuncs=*[[SendDeathInfo]]
relfuncs=*[[SendDeathInfo]]
}}
}}

Revision as of 04:13, 20 November 2022


Description:


Parameters:

( bodypartId, animationId )

bodypartId : The bodypart which 'was' hit.
animationId :: The same as the animation ID used in server side.


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


Example

SendShotInfo( 6, 17 ); //6 means head and 17 means shot in face.
SetTimerEx( "SendDeathInfo", 2000, 1, 27, 0, 6 );

Related Functions

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