Player.AddDeaths

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:AddDeaths( Integer deaths )
Description:
Increases the number of deaths by a specified number
Returns: nil
In Object: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.AddDeaths]Player.AddDeaths [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionAdds 20 deaths to the player if the player runs a specified command
Used onNewerServer.png
Code
function iHateMyLives(ply, cmd, args)
	ply:Kill()
	ply:AddDeaths(20)
end
 
concommand.Add("iwanttodie", iHateMyLives)
OutputThe user dies, and 20 deaths is added to his death count when he runs "iwanttodie"


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox