Scripting/Squirrel/Functions/Players/SetInterior

From VC-MP Wiki

Jump to: navigation, search

This function sets player's interior.

Syntax

bool player.SetInterior( int interiorID )

Arguments

  • interiorID - This is the ID of the wanted interior

Example

This example resets player interior to the default one when they type '/c resetinterior'.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "resetinterior" )
     {
          player.SetInterior( 0 );
     }
}

Notes

Remember: When you set a new interior for player, he will be teleported to z + 1 or z + 2.

All interiors ID's are here. The call onPlayerCommand was used in in this example. More info about it in the corresponding page.

Related Functions

Personal tools
squirrel scripting