Scripting/Squirrel/Functions/Players/SetDrunkLevel

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 drunk level and handling ability for the given player.

Syntax

bool Player.SetDrunkLevel( int visuals, int handling )

Arguments

  • visuals - The level for drunken visual effects
  • handling - Vehicle handling ability level

Example

This command will change a player's drunk level to 100 by typing '/c makemedrunk'.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "makemedrunk" )
     {
          player.SetDrunkLevel( 100, 100 );
     }
}

Notes

The call onPlayerCommand was also used in this example. More info about this in the corresponding page.

Related Functions

Personal tools
squirrel scripting