Garry's Mod Wiki

Garry's Mod Wiki

  Entity:SetPredictable( boolean setPredictable )


Sets whether an entity should be predictable or not. When an entity is set as predictable, its DT vars can be changed during predicted hooks. This is useful for entities which can be controlled by player input.

Any datatable value that mismatches from the server will be overridden and a prediction error will be spewed.

Weapons are predictable by default, and the drive system uses this function to make the controlled prop predictable as well.

Visit for a list of all predicted hooks, and the Prediction page. For further technical information on the subject, visit valve's wiki.

This function resets the datatable variables everytime it's called, it should ideally be called when a player starts using the entity and when he stops
Entities set as predictable with this function will be unmarked when the user lags and receives a full packet update, to handle such case visit GM:NotifyShouldTransmit


1 boolean setPredictable
whether to make this entity predictable or not.

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...