Garry's Mod Wiki

Entity:SetPredictable

Entity:SetPredictable( boolean setPredictable )

Description

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

Arguments

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

Page Links


Special Pages


Wikis

?

Render Time: 32ms

Session 0
DB GetPage 3
Generate Html 7
SaveChanges 8
Render Body 0
Render Sidebar 12