OnPlayerDamage

From Onset Developer Wiki
Revision as of 10:38, 23 March 2019 by BlueMountains (talk | contribs)
OnPlayerDamage

Type: Event
Context: Server
Introduced: v1.0

Description

__EDIT_ME__

Syntax

OnPlayerDamage(player, damagetype, amount)

Parameters

  • player
    The player who is being damaged.
  • damagetype
    Type of damage applied.
  • amount
    Amount of damage applied.

Example

function OnPlayerDamage(player, damagetype, amount)
	local DamageName = {
		"Weapon",
		"Explosion",
		"Fire",
		"Fall",
		"Vehicle Collision"
	}

	print(GetPlayerName(player).."("..player..") took "..amount.." damage of type "..DamageName[damagetype])
end
AddEvent("OnPlayerDamage", OnPlayerDamage)

See also

Player

Vehicle

Game

Package

NPC

Object

Pickup

Text3D

Door