ReadIniBool

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events
Note: This function requires the external module lu_ini.

This function reads a boolean value from an .ini file.

Syntax

  1. bool ReadIniBool( string filename, string section, string var )

Arguments

  • filename This is the name of the file
  • section The section that contains the value you want read
  • var The name of the variable

Example

This example will check whether the player has been frozen earlier and if so, freezes them on join.

  1.  
  2. function onPlayerJoin( player )
  3. {
  4. if ( ReadIniBool( "Players.ini", "Frozen", player.Name ) )
  5. {
  6. player.Frozen = true;
  7. MessagePlayer( "Sorry, you have been frozen earlier! :)", player );
  8. }
  9. }
  10.  

Notes

The functions Player.Frozen, MessagePlayer and call onPlayerJoin were also used in in this example. More info about them in the corresponding pages.

Related Functions

These functions are provided by the official module lu_ini.

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox