Scripting/Squirrel/Functions/Object.ID

From Vice City Multiplayer
Revision as of 18:33, 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 returns an object's ID.

Syntax

Object.ID;

Arguments

N/A

Example

function onScriptLoad ( )
{
local ids = "";
for ( local i=0; i< GetObjectCount(); i++)
{
if ( FindObject( i ) ) ids = ids + ", " + FindObject( i ).ID;
}
print( "Loaded objects with ids: " + ids );
}

Related Functions