Scripting/Squirrel/Functions/Players/SetDrunkLevel
From VC-MP Wiki
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
- FindPlayer
- Player.Angle
- Player.Armour
- Player.Cash
- Player.Class
- Player.DrivebyAbility
- Player.GetSpectating
- Player.GetSyncBlockedTo
- Player.Health
- Player.ID
- Player.IP
- Player.IsAdmin
- Player.IsFrozen
- Player.IsIgnoredBy
- Player.IsMuted
- Player.IsPassenger
- Player.IsSpawned
- Player.IsSyncBlocked
- Player.IsWeaponSyncBlocked
- Player.Keys
- Player.Name
- Player.Ping
- Player.Pos
- Player.RemoveLocalMarker
- Player.RemoveMarker
- Player.ResetGameSettings
- Player.Score
- Player.Seat
- Player.SetAnim
- Player.SetDrunkLevel
- Player.SetIgnoredBy
- Player.SetInterior
- Player.SetLocalMarker
- Player.SetMarker
- Player.SetSyncBlockedTo
- Player.WantedLevel
- Player.SetWeapon
- Player.Skin
- Player.SpawnPos
- Player.Team
- Player.Vehicle
- Player.Weapon
- Player.ShootInAir
- Player.StuntMode
- Player.Spikes
