Est SetViewAngle

From EventScripts Community Encyclopedia
Syntax: est_SetViewAngle <identifier> <pitch> <yaw> <roll>
Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Contents

Description

Changes where the player is looking at

Parameters

Example


event player_hurt
{
     //Make a player look at the ground when they hurt someone
     es est_SetViewAngle event_var(attacker) 90 90 0
}


event bomb_begindefuse
{
     //Make a player look in the opposite direction when they try defusing
     es_xset defuse_x 0
     es_xset defuse_y 0
     es_xset defuse_z 0
     es est_GetViewAngle event_var(userid) defuse_x defuse_y defuse_z
     es_xmath defuse_x + 180
     es_xmath defuse_y + 180
     es est_SetViewAngle event_var(userid) server_var(defuse_x) server_var(defuse_y) server_var(defuse_z)
}

Notes

  • Angle, not coord

See Also

blog comments powered by Disqus