CS:GO VScript Examples: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:


{{todo}}
{{todo}}
==See also==
*[[List of Counter-Strike: Global Offensive Script Functions]]
*[[Logic_script|logic_script]]
*[[VScript|vscript]]
[[Category:Counter-Strike:_Global_Offensive]]
[[Category:Scripting]]

Revision as of 21:03, 3 March 2016

Counter-Strike: Global Offensive The following are example vscripts for Counter-Strike: Global Offensive.

Find the closest player to a known entity

buttonReference <- Entities.FindByName( null, "button_01" ); // find the in-game entity "button_01" and store its targetname
		player <- Entities.FindByClassnameNearest( "player", buttonReference.GetOrigin(), 512 ); // find the nearest player within 512 hammer units to the button's origin and create a variable.

[Todo]

See also