Scripting/Server/Functions/ToggleRagdollPhysics

(v0.4.8+) Switches ragdoll physics on or off for every player on the server (it is sent to everybody who is connected, and to everybody who joins). With it on, a ped or player that dies, is knocked down or falls hard does not play the canned animation: the body goes limp on the game's own collision. Shots push the body at the spot that was hit, explosions throw every body in range (also corpses lying still), a fast car throws a body over its bonnet, and corpses collide with each other. It works on the original skeleton, no Skin & Bones mod is needed. It is simulated by each client for the peds it sees (it is not synced), PC and Android. Off by default; a reload of the scripts switches it off again until the script calls it. Client console: /ragdoll on|off|knock.

Syntax

ToggleRagdollPhysics(bool)

Arguments

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "toggleragdollphysics" )
	{
		ToggleRagdollPhysics( true );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Server information and administration

Categories: Server functions | Server information and administration