Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 29/07/23 in all areas

  1. You will have to cancel the following event when you are glued. You can for example check if the player is attached to anything and then cancel the event. https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter addEventHandler ( "onVehicleStartEnter", root, function (player) if getElementAttachedTo (player) then -- check here if you are glued or not. cancelEvent() end end )
    1 point
  2. 1 point
  3. @scolen You can give this utility function a try (untested). It is important to know that you can only check this information serverside. --[[ Check if the player is inside of an acl group with a specific name Argument 1: player element Argument 2: aclGroupName string ]] function isPlayerInAclGroupWithName (player, aclGroupName) -- Check if the player argument is filled in correctly if not isElement(player) or getElementType(player) ~= "player" then error("Expected player element at argument 1, got " .. inspect(player), 2) end -- Check if the aclGroupName is filled in correctly if type(aclGroupName) ~= "string" then error("Expected string at argument 2, got " .. inspect(aclGroupName), 2) end -- Get the player account and check if the player is logged in local account = getPlayerAccount ( player ) if isGuestAccount(account) then return false end -- Get the acl group local aclGroup = aclGetGroup ( aclGroupName ) if not aclGroup then return false end -- Check if the account name of the user is inside of the acl group local accountName = getAccountName ( account ) return isObjectInACLGroup ("user." .. accountName, aclGroup) end Usage: if isPlayerInAclGroupWithName(player, "police") then outputChatBox("I am the police", player) end
    1 point
×
×
  • Create New...