GetMarkerCount: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Server client function}} Returns the number of markers that currently exist in the world. ==Syntax== <syntaxhighlight lang="lua"> int getMarkerCount ( ) </syntaxhighlight> ===Required Arguments=== ''No...)
 
(note)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
Returns the number of markers that currently exist in the world.


Returns the number of markers that currently exist in the world.
<!-- Sorry, but I think this should be deleted, it's useless, i can use #getElementsByType("marker") [iManGaaX :)] -->


==Syntax==
==Syntax==
Line 12: Line 13:
''None''
''None''


==Returns==
===Returns===
Returns the number of markers that currently exist.
Returns the number of markers that currently exist.
==Example==
This example outputs the amount of markers to the player.
<syntaxhighlight lang="lua">
function howManyMarkers(thePlayer,command)
local ammount = getMarkerCount()
outputChatBox("There are "..ammount.." markers.",thePlayer,255,255,0)
end
addCommandHandler("markers",howManyMarkers)
</syntaxhighlight>


==See Also==
==See Also==
{{Marker functions}}
{{Marker functions}}

Latest revision as of 13:40, 10 October 2023

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


Syntax

int getMarkerCount ( )

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