Last active
November 3, 2016 00:53
-
-
Save CaptainPRICE/da190e6b78c0863ce133b55ce08cf670 to your computer and use it in GitHub Desktop.
Functions to be added to Expression 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A single function to rule everything about entity searching. | |
| # (1) array/entity: Player(s) to search the entities of. | |
| # (2) array/string: Parameter to be used with search. | |
| # (3) number: Type of search to be executed (valid values: _FIND_BY_CLASS, _FIND_BY_MODEL, _FIND_BY_NAME). | |
| # Examples: | |
| entsByPlayer(owner(), "*", _FIND_BY_CLASS) # Gets all entities owned by you. | |
| entsByPlayer(playersAdmins(), "*", _FIND_BY_CLASS) # Gets all entities that are owned by all admins. | |
| entsByPlayer(owner(), array("prop_*", "gmod_wire_expression2"), _FIND_BY_CLASS) # Gets all entities that you own, and whose class name matches any of the strings (specified by 2nd argument). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment