IsPedTargetingMarkerEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Func.desc.+ /isPedTargetingMarkerEnabled)
 
(MORE SPACES!!111)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
{{Client function}}
[[Image:Targetingmarker.png|thumb|200px|Targeting marker]]
This function checks whether health target markers are drawn as set by [[setPedTargetingMarkerEnabled]] or not.
This function checks whether health target markers are drawn as set by [[setPedTargetingMarkerEnabled]] or not.


==Syntax==
==Syntax==
Line 7: Line 11:
bool isPedTargetingMarkerEnabled ( )
bool isPedTargetingMarkerEnabled ( )
</syntaxhighlight>
</syntaxhighlight>


===Returns===
===Returns===
Returns ''true'' if the health target markers are enabled, ''false'' if not.
Returns ''true'' if the health target markers are enabled, ''false'' if not.


==Example==
==Example==

Latest revision as of 13:55, 26 August 2016

Targeting marker

This function checks whether health target markers are drawn as set by setPedTargetingMarkerEnabled or not.



Syntax

bool isPedTargetingMarkerEnabled ( )


Returns

Returns true if the health target markers are enabled, false if not.


Example

Click to collapse [-]
Client

This example will toggle the targeting markers with the command /togtargetmarkers.

function toggleTargetMarkers(cmd)
	local targets = isPedTargetingMarkerEnabled()
	setPedTargetingMarkerEnabled(not targets)
	outputChatBox("You have " .. (targets and "enabled" or "disabled") .. " target markers.", 0, 255, 0, false)
end
addCommandHandler("togtargetmarkers", toggleTargetMarkers)

See Also