Gamemode.CanPlayerUnfreeze

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameCanPlayerUnfreeze
SyntaxGM:CanPlayerUnfreeze( Player Player, Entity Entity, PhysObj PhysObj )
DescriptionCan the player unfreeze this entity & physobject.
ReturnsBoolean
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.CanPlayerUnfreeze]Gamemode.CanPlayerUnfreeze [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionBlocks the player from unfreezing the prop unless he is an admin.
Used onNewerServer.png
Code
function PhysUnfreeze( ply, ent, phys )
	if( not ply:IsAdmin( ) ) then //if player isnt an admin
		return false //don't let them unfreeze it
	end
end
hook.Add( "CanPlayerUnfreeze", "PhysUnfreeze", PhysUnfreeze )
OutputN/A


Additional Notes


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox