Scripting/Squirrel/Functions/Camera/GetCinematicBorder

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 return the state of cinematic border (wide screen) for the given player.

Syntax

bool GetCinematicBorder( Player plr )

Arguments

  • plr - The player of whose status should be checked

Example

A '/c cinematic' command.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "cinematic" )
     {
          if ( !GetCinematicBorder( player ) ) MessagePlayer( "Cinematic border is OFF.", player );
          else if ( GetCinematicBorder( player ) ) MessagePlayer( "Cinematic border is ON.", player );
          else MessagePlayer( "You have just failed.", player );
     }
}

Notes

The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Personal tools
squirrel scripting