Summary

Methods

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.
Stops searches that are no longer allowed and clears the searcher of players nobody is searching anymore.
Opens the target's inventory for the searching player.
Ends a search, closing the searched player's inventories and their window for the searcher.

Methods

PlayerSearch:CanSearch(actor, target)

server plugins/playersearch/plugin/sv_hooks.lua:74

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

PlayerSearch:CanStartSearch(actor, target)

server plugins/playersearch/plugin/sv_hooks.lua:39

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:6

Adds 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

PlayerSearch:OnInventoryClosed(actor, inventory)

server plugins/playersearch/plugin/sv_hooks.lua:7

Ends the search when the searcher closes the searched player's inventory.

Parameters

  • actor Player player that closed the inventory
  • inventory Inventory closed inventory

PlayerSearch:PlayerOneSecond(actor)

server plugins/playersearch/plugin/sv_hooks.lua:18

Stops searches that are no longer allowed and clears the searcher of players nobody is searching anymore.

Parameters

  • actor Player player being checked

PlayerSearch:start(actor, target)

server plugins/playersearch/plugin/sv_plugin.lua:6

Opens the target's inventory for the searching player.

Parameters

  • actor Player player doing the search
  • target Player player being searched

PlayerSearch:stop(actor, target)

server plugins/playersearch/plugin/sv_plugin.lua:18

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

Defined in