IsPedTargetingMarkerEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Func.desc.+ /isPedTargetingMarkerEnabled)
 
mNo edit summary
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 10: Line 13:
===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==

Revision as of 13:54, 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