SANDBOX:PlayerSpawnRagdoll

From Garry's Mod
Jump to: navigation, search
 SANDBOX:PlayerSpawnRagdoll( )

Contents

Description

Called when a player attempts to spawn a ragdoll from the Q menu.

Arguments

Player ply

The player who attempted to spawn a ragdoll.

Arguments

string model

Path to the model of the ragdoll the player is attempting to spawn.

Returns

boolean

Should the player be able to spawn the ragdoll or not.

Examples

Example

Stops non-admins from spawning ragdolls.

function GM:PlayerSpawnRagdoll( ply, model )
	if ( not ply:IsAdmin() ) then
		return false
	end
end


Personal tools
Navigation