Scripting/Squirrel/Functions/GetObjectCount

From Vice City Multiplayer
Revision as of 09:16, 9 March 2016 by Xmair (talk | contribs) (Created page with "This function will return the current object count. == Syntax == <pre>GetObjectCount()</pre> == Arguments == '''N/A''' == Return value == * '''int.''' == Example == Thi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will return the current object count.

Syntax

GetObjectCount()

Arguments

N/A

Return value

  • int.

Example

This command will return the object count.

function onPlayerCommand ( player , cmd , text )
{
if( cmd == "objects")
{
MessagePlayer("There are " + GetObjectCount() + " objects in this server!" , player );
}

- Xmair.

Notes

Call onPlayerCommand was used in this example.

Related Functions