ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. aclSetRight

Function

aclSetRight

Sets a right on a list. Right names: "command.name", "function.name", "resource.name" or your own ("general.name"). The fourth argument sets an expiry.

Syntax

bool aclSetRight(acl theAcl, string rightName, bool hasAccess [, int expiresInMs = nil])

Arguments

theAclacl
The list.
rightNamestring
Right name.
hasAccessbool
true allows, false denies.
expiresInMsint, optional = nil
After how many milliseconds the right expires.Not in MTA:SA

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

aclSetRight(acl theAcl, string rightName, bool hasAccess)

Returns

true on success.

Example

aclSetRight(aclGet("VIP"), "general.vip_garage", true, 30 * 24 * 60 * 60 * 1000)

See also