onPlayerKill

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This event is called when a remote player is killed by another player

Syntax

  1. function onPlayerKill( killer, killed, weapon, bodypart )

Arguments

  • killer - The pointer to the killer
  • killed - The pointer to the player that was killed
  • weapon - The weapon used
  • bodypart - The bodypart hit

Returns

This event does not handle return values.

Example

This example outputs a message to the client, when a remote player kills another player.

  1.  
  2. function onPlayerKill( killer, killed, weapon, bodypart )
  3. {
  4. // Output a message stating the killer and who was killed
  5. Message( "* " + killer.Name + " just killed " + killed.Name + "!", 255, 0, 0 );
  6. return 1;
  7. }
  8.  

Notes

-- List of used functions and other notes here.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox