Hooks
Module-specific events raised by the Realisticview module.
ShouldUseRealisticView
Purpose
Called before the module alters the player's camera. Returning false prevents the realistic view from being used.
Parameters
client
(Player
):The player whose view is being calculated.
Realm
Client
Returns
boolean
— Return false to cancel the realistic view.
Example
hook.Add("ShouldUseRealisticView", "BlockInVehicle", function(client)
if client:InVehicle() then
return false
end
end)
RealisticViewUpdated
Purpose
Fired after the view table has been built. Allows modification of the values.
Parameters
-
client
(Player
):The player whose view is being updated.
-
view
(table
):Table containing origin and angles that may be changed.
Realm
Client
Returns
nil
— Return value is ignored.
Example
RealisticViewCalcView
Purpose
Final hook before the adjusted view is returned.
Parameters
-
client
(Player
):The player whose view is being calculated.
-
view
(table
):Table that can be modified.
Realm
Client
Returns
nil
— Return value is ignored.
Example
hook.Add("RealisticViewCalcView", "AddRoll", function(client, view)
view.angles.r = view.angles.r + 5
end)