IsPedTargetingMarkerEnabled

From Multi Theft Auto: Wiki
Revision as of 11:16, 14 March 2013 by Myonlake (talk | contribs) (Func.desc.+ /isPedTargetingMarkerEnabled)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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