aclDestroy | Multi Theft Auto: Wiki Skip to content

aclDestroy

Client-side
Server-side
Shared

This function destroys the ACL passed. The destroyed ACL will no longer be valid.

OOP Syntax Help! I don't understand this!

  • Method:acl:destroy(...)

Syntax

bool aclDestroy ( acl theACL )
Required Arguments
  • theACL: The ACL to destroy.

Returns

  • bool: resullt

Returns true if successfully destroyed and false if it could not be deleted (ie. it's not valid).

Code Examples

server

This example shows you a command to delete an ACL.

local function deleteSomeACL(thePlayer, cmdname, theACL)
local acl = aclGet(theACL)
if (acl) then -- Check if the specified ACL exists
-- If it does
aclDestroy(acl) -- Remove the ACL
outputChatBox("ACL " .. theACL .. " Succesfully removed!", thePlayer)
else -- If the ACL doesn't exists
outputChatBox("Error: Invalid ACL Name specified, or the ACL doesn't exist.", thePlayer)
end
end
addCommandHandler("deleteACL", deleteSomeACL) -- Add the commandhandler