OnPlayerCrouchChange

From Vice City Multiplayer
Revision as of 22:34, 18 March 2016 by Decent 946 (talk | contribs) (Created page with "__NOTOC__ This Function is trigged when a player is crouching. == Syntax == <pre>function onPlayerCrouchChange( player, isCrouchingNow )</pre> == Parameters == * Scripti...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This Function is trigged when a player is crouching.

Syntax

function onPlayerCrouchChange( player, isCrouchingNow )

Parameters

  • Player player - The player who changes the action.
  • Bool isCrouchingNow - checks if the player is crouching.

Example

In this example, Whenever the player Will crouch, he will receive a message that "you are crouching now".

function onPlayerCrouchChange( player, isCrouchingNow )
{
	if ( isCrouchingNow ) //checks if the player is crouching.
    {
	PrivMessage( player, " you are crouching right now." );
    }
}

Notes

Function PrivMessage was used in this example.

Related Events