OnPlayerCrouchChange: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
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...") |
No edit summary |
||
Line 27: | Line 27: | ||
Function [[Scripting/Squirrel/Functions/PrivMessage|''PrivMessage'']] was used in this example. | Function [[Scripting/Squirrel/Functions/PrivMessage|''PrivMessage'']] was used in this example. | ||
== Related | == Related Functions == | ||
{{Scripting/Squirrel/Events/Player_Events}} | {{Scripting/Squirrel/Events/Player_Events}} | ||
[[Category:Scripting/Squirrel/Events/Player_Events]] |
Latest revision as of 22:17, 30 January 2017
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 Functions
- onPlayerJoin( player )
- onPlayerPart( player, reason )
- onPlayerRequestClass( player, classID )
- onPlayerRequestSpawn( player )
- onPlayerSpawn( player )
- onPlayerDeath( player, reason )
- onPlayerKill( killer, player, reason, bodypart )
- onPlayerTeamKill( killer, player, reason, bodypart )
- onPlayerChat( player, message )
- onPlayerCommand( player, command, arguments )
- onPlayerPM( player, playerTo, message )
- onPlayerBeginTyping( player )
- onPlayerEndTyping( player )
- onLoginAttempt( playerName, password, ipAddress )
- onNameChangeable( player ) // Currently can't work.
- onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )
- onPlayerHealthChange( player, lastHP, newHP )
- onPlayerArmourChange( player, lastArmour, newArmour )
- onPlayerWeaponChange( player, oldWep, newWep )
- onKeyDown( player, bindID )
- onKeyUp( player, bindID )
- onPlayerAwayChange( player, newStatus )
- onPlayerSpectate( player, target )
- onPlayerCrashDump( player, crashReport )
- onPlayerNameChange( player, oldName, newName )
- onPlayerActionChange( player, oldAction, newAction )
- onPlayerStateChange( player, oldState, newState )
- onPlayerOnFireChange( player, isOnFireNow )
- onPlayerCrouchChange( player, isCrouchingNow )
- onPlayerGameKeysChange( player, oldKeys, newKeys )