PlayerSearch class
Part of Player Search
Summary
Methods
CanSearch(actor, target)server
Requires the searched player to be a valid non-bot player within 100 units who is facing away.
Checks the search cooldowns, pending requests and existing searches before a search can be requested.
Adds a search option to the interaction menu of players that are facing away from the local player.
Ends the search when the searcher closes the searched player's inventory.
PlayerOneSecond(actor)server
Stops searches that are no longer allowed and clears the searcher of players nobody is searching anymore.
start(actor, target)server
Opens the target's inventory for the searching player.
stop(actor, target)server
Ends a search, closing the searched player's inventories and their window for the searcher.
Methods
Requires the searched player to be a valid non-bot player within 100 units who is facing away.
Parameters
- actor Player player doing the search
- target Player player being searched
Returns
- Boolean false and String error phrase if the search is not allowed, nil otherwise
Checks the search cooldowns, pending requests and existing searches before a search can be requested.
Parameters
- actor Player player requesting the search
- target Player player to search
Returns
- Boolean false and String error phrase if the search cannot start, nil otherwise
PlayerSearch:CreatePlayerInteractions(menu, target)
client plugins/playersearch/plugin/cl_hooks.lua:6Adds a search option to the interaction menu of players that are facing away from the local player.
Parameters
- menu Panel interaction menu
- target Player player the menu was opened for
Ends the search when the searcher closes the searched player's inventory.
Parameters
- actor Player player that closed the inventory
- inventory Inventory closed inventory
Stops searches that are no longer allowed and clears the searcher of players nobody is searching anymore.
Parameters
- actor Player player being checked
Opens the target's inventory for the searching player.
Parameters
- actor Player player doing the search
- target Player player being searched
Ends a search, closing the searched player's inventories and their window for the searcher.
Parameters
- actor Player player doing the search, may be nil
- target Player player being searched