Scripting/Squirrel/Functions/Camera/SetCinematicBorder

From VC-MP Wiki

Jump to: navigation, search

NOTE: This function has been added in VC:MP 0.3z r2. It will not work in previous versions.


This function will set the state of cinematic border (wide screen) for the given player.

Syntax

bool SetCinematicBorder( Player plr, bool bEnable )

Arguments

  • plr - The player to set the camera status for
  • bEnable - whether to enable or disable the cinematic border

Example

This command enables the cinematic border when a player types '/c cinemaon'.

function onPlayerCommand( player, cmd, text )
{
	if ( cmd == "cinemaon" )
	{
		SetCinematicBorder( player, true );
        }
}

Example 2

This command disables the cinematic border when a player types '/c cinemaoff'.

function onPlayerCommand( player, cmd, text )
{
	if ( cmd == "cinemaoff" )
	{
		SetCinematicBorder( player, false );
        }
}

Example 3

The cinematic border will be turned ON when the player joins...

function onPlayerJoin( player )
{
     SetCinematicBorder( player, true );
}

Notes

Related Functions

Personal tools
squirrel scripting