Gamemode.OnPhysgunFreeze

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameOnPhysgunFreeze
SyntaxGM:OnPhysgunFreeze( Entity Weapon, Physobj Physobj, Entity Ent, Player Player )
DescriptionCalled when a player freezes an entity with the Physgun.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.OnPhysgunFreeze]Gamemode.OnPhysgunFreeze [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionDetermine whether or not a player is allowed to freeze an entity.
Used onNewerServer.png
Code
function PhysgunFreezing(weapon, physobj, ent, pl)
	pl:Ignite(10, 0);
	return false;
end
hook.Add("OnPhysgunFreeze", "PhysgunFreezing", PhysgunFreezing);
OutputKeeps the player from freezing any objects with the physgun and ignites him.


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox