Garry's Mod Wiki

Garry's Mod Wiki

  Entity GM:FindUseEntity( Player ply, Entity defaultEnt )

Description

This hook polls the entity the player use action should be applied to.

The default behavior of this hook is in CBasePlayer::FindUseEntity. Despite CBasePlayer::FindUseEntity being defined shared, it is only called serverside in practice, so this hook will be only called serverside, as well. It is possible for modules to call it clientside, so the Lua code should still be treated as shared.

Arguments

1 Player ply
The player who initiated the use action.
2 Entity defaultEnt
The entity that was chosen by the engine.

Returns

1 Entity
The entity to use instead of default entity

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...