ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. lockControls

Function

lockControls

Server and clientInput and controlsTrilogy Hub only

Locks controls on behalf of an owner. A control comes back only when its last owner releases it, so several resources can lock it without unlocking each other. A resource's locks disappear when it stops.

Syntax

bool lockControls(mixed ...)

Arguments

...mixed
Server: player, owner, controls; client: owner, controls. owner is any name, controls is a control name or a list of names.

Returns

true on success.

Example

lockControls("sklep", { "fire", "aim_weapon", "enter_exit" })
setTimer(function() unlockControls("sklep") end, 5000, 1)

See also