Squirrel/Server/Events/Player/onPlayerFall

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|onPlayerFall}} This is called when a player gets knocked down by a weapon such as the shotgun. == Syntax == <code>function onPlayerFall( Player player )</code>…')
 

Latest revision as of 17:25, 22 December 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This is called when a player gets knocked down by a weapon such as the shotgun.

[edit] Syntax

  1. function onPlayerFall( Player player )

[edit] Arguments

  • player - The pointer of the player who fell

[edit] Returns

This event does not handle return values.

[edit] Example

This will message the player who fell. (Such a useful example!)

  1.  
  2. function onPlayerFall( player, oldhp, newhp )
  3. {
  4. MessagePlayer( "You just fell! :o", player );
  5. return 1;
  6. }
  7.  

[edit] Notes

The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.

[edit] Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox