IsPedTargetingMarkerEnabled

From Multi Theft Auto: Wiki
Jump to: navigation, search

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