GetMarkerCount

From Multi Theft Auto: Wiki

(Difference between revisions)
Jump to: navigation, search
m (Needs example)
(Added an example.)
 
Line 15: Line 15:
==Example==
==Example==
 +
This example outputs the amount of markers to the player.
<code>[lua]
<code>[lua]
-
--TODO
+
function howManyMarkers(thePlayer,command)
 +
local ammount = getMarkerCount()
 +
outputChatBox("There are "..ammount.." markers.",thePlayer,255,255,0)
 +
end
 +
addCommandHandler("markers",howManyMarkers)
</code>
</code>
==See Also==
==See Also==
{{Marker functions}}
{{Marker functions}}
-
[[Category:Needs Example]]
 

Latest revision as of 02:50, 31 May 2010

Returns the number of markers that currently exist in the world.

Syntax

Required Arguments

None

Returns

Returns the number of markers that currently exist.

Example

This example outputs the amount of markers to the player.

function howManyMarkers(thePlayer,command)
	local ammount = getMarkerCount()
	outputChatBox("There are "..ammount.." markers.",thePlayer,255,255,0)
end
addCommandHandler("markers",howManyMarkers)

See Also