Object.Model

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events


This Object class member returns the Model of the given object.

Syntax

  1. Integer object.Model

Example

This will tell the player the model ID of object ID 0 when they type '/model'

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "model" )
  5. {
  6. local pObject = FindObject( 0 );
  7. if ( pObject ) MessagePlayer( "Object ID 0, Model - " + pObject.Model, pPlayer );
  8. }
  9. return 1;
  10. }
  11.  

Notes

The functions MessagePlayer and FindObject and event onPlayerCommand were used in this example. More info about them in the corresponding pages.


Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox