GetMarkerTargetArrowProperties: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
 (Created page with "__NOTOC__ {{Server client function}} {{New feature/item|9.0161|1.6.0|22620|function returns the color, transparency and size for a checkpoint marker's target arrow.}}  ==Syntax== <syntaxhighlight lang="lua"> int, int, int, int, int getMarkerTargetArrowProperties( marker theMarker ) </syntaxhighlight> ===Required Arguments=== *'''theMarker''': The marker that you wish to retrieve the color and size of.  ===Returns=== Returns five ints corresponding to the amount o...")  | 
				No edit summary  | 
				||
| Line 14: | Line 14: | ||
==Example==  | ==Example==  | ||
<syntaxhighlight lang="lua">  | |||
addEventHandler("onClientResourceStart", resourceRoot, function()  | |||
    local myMarker = createMarker(0, 0, 3, "checkpoint", 2.0, 255, 0, 0, 150)  | |||
    setMarkerTarget(myMarker, 10, 0, 3)  | |||
    local r, g, b, a, size = getMarkerTargetArrowProperties(myMarker)  | |||
    if r then  | |||
        outputChatBox("Marker Target Arrow Properties:")  | |||
        outputChatBox("Color: R=" .. r .. " G=" .. g .. " B=" .. b)  | |||
        outputChatBox("Alpha: " .. a)  | |||
        outputChatBox("Size: " .. size)  | |||
    else  | |||
        outputChatBox("Error: Could not retrieve marker target arrow properties.")  | |||
    end  | |||
end)  | |||
</syntaxhighlight>  | |||
==See Also==  | ==See Also==  | ||
{{Marker functions}}  | {{Marker functions}}  | ||
Latest revision as of 09:25, 10 July 2025
Syntax
int, int, int, int, int getMarkerTargetArrowProperties( marker theMarker )
Required Arguments
- theMarker: The marker that you wish to retrieve the color and size of.
 
Returns
Returns five ints corresponding to the amount of red, green, blue, alpha and size of the marker's target arrow, false if invalid arguments were passed.
Example
addEventHandler("onClientResourceStart", resourceRoot, function()
    local myMarker = createMarker(0, 0, 3, "checkpoint", 2.0, 255, 0, 0, 150)
    setMarkerTarget(myMarker, 10, 0, 3)
    local r, g, b, a, size = getMarkerTargetArrowProperties(myMarker)
    if r then
        outputChatBox("Marker Target Arrow Properties:")
        outputChatBox("Color: R=" .. r .. " G=" .. g .. " B=" .. b)
        outputChatBox("Alpha: " .. a)
        outputChatBox("Size: " .. size)
    else
        outputChatBox("Error: Could not retrieve marker target arrow properties.")
    end
end)
See Also
- createMarker
 - getMarkerColor
 - getMarkerCount
 - getMarkerIcon
 - getMarkerSize
 - getMarkerTarget
 - getMarkerType
 - setMarkerColor
 - setMarkerIcon
 - setMarkerSize
 - setMarkerTarget
 - setMarkerType
 - isElementWithinMarker