Scripting/Squirrel/Functions/Object.ID

From Vice City Multiplayer
Revision as of 10:44, 9 March 2016 by Xmair (talk | contribs) (Created page with "This function returns an object's ID. == Syntax == Object.ID; == Arguments == '''N/A''' == Example == <source lang=squirrel> function onScriptLoad ( ) { local ids = "";...")
(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 );
}