Est GetEyeCoord

From EventScripts Community Encyclopedia
Syntax: est_GetEyeCoord <players> <variablex> <variabley> <variablez>
Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Description

Gets where a player is looking and saves the x, y and z locations to variables.

Parameters

  • players - See Est_PlayerSelection for player selection help
  • variablex - Variable to store the x value
  • variabley - Variable to store the y value
  • variablez - Variable to store the z value

Example


event player_say
{
	if (event_var(text) == "!look") do 
	{
		es_set tempvarx 0
		es_set tempvary 0
		es_set tempvarz 0
		
		es est_GetEyeCoord event_var(userid) tempvarx tempvary tempvarz
		
		es_tell event_var(userid) You are looking at: x: server_var(tempvarx) y: server_var(tempvary) z: server_var(tempvarz)
	}
}

This will tell a player where he is looking when he types !look in chat

blog comments powered by Disqus