Scripting/Squirrel/Functions/GetObjectCount

From Vice City Multiplayer
Revision as of 19:13, 30 January 2017 by Thijn (talk | contribs)
(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 );
}

Notes

Call onPlayerCommand was used in this example.

Related Functions