Difference between revisions of "DAMAGE CHAR"
Jump to navigation
Jump to search
(Created page with "{{Native |np=2 |p1t=Handle |p1d=Ped Handle |p2t=int |p2d=damage? }} The results of this function are either unknown or untested.") |
m |
||
Line 1: | Line 1: | ||
{{Native | {{Native | ||
− | |np= | + | |np=3 |
|p1t=Handle | |p1t=Handle | ||
|p1d=Ped Handle | |p1d=Ped Handle | ||
− | |p2t= | + | |p2t=uint |
− | |p2d= | + | |p2d=hit_points |
+ | |p3t=bool(?) | ||
+ | |p3d=unknown | ||
}} | }} | ||
− | + | == Description == | |
+ | |||
+ | Subtracts ''hit_points'' from the health of a ped. | ||
+ | |||
+ | |||
+ | == Example == | ||
+ | |||
+ | <source lang="cpp"> | ||
+ | |||
+ | if(IsGameKeyboardKeyPressed(20)) | ||
+ | { | ||
+ | //It doesn't matter if the last parameter is 0 or 1. | ||
+ | //This may indicate that the last parameter is not of type bool | ||
+ | //or that it isn't used in the function. | ||
+ | DamageChar(niko, 20, 0); | ||
+ | } | ||
+ | |||
+ | |||
+ | </source> |
Latest revision as of 13:00, 8 January 2015
Number of parameters: 3 | ||
---|---|---|
Parameter # | Type | Description |
1. | Handle | Ped Handle |
2. | uint | hit_points |
3. | bool(?) | unknown |
Return value: | ||
Type | Description | |
None |
Description
Subtracts hit_points from the health of a ped.
Example
if(IsGameKeyboardKeyPressed(20))
{
//It doesn't matter if the last parameter is 0 or 1.
//This may indicate that the last parameter is not of type bool
//or that it isn't used in the function.
DamageChar(niko, 20, 0);
}