Jump to content
  • 0

Help [ACLTeleport]


KMultiScripter

Question

--[[
Esse é um script de teleporte por ACL, ou seja apenas os usuários que tem a ACL permitida vai poder entrar.
(pode retirar) Créditos: KMulti#0150
]]--
-- Saída base: 2023.787, -1370.616, 40.313
-- Entrada base: 2025.32, -1370.41, 40.313
-- Fora da base 2027.296, -1392.667, 40.3134, Dentro da base 2023.787, -1370.616, 40.313
local entrada = createMarker(1478.8662109375, -1737.8997802734, 14.1, "arrow", 1, 255, 255, 255, 180) -- Cria um marker que vai servir para a entrada da base.


function createMarker(thePlayer)
	accName = getAccountName (getPlayerAccount (thePlayer))
  	if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Samu" ) ) then -- Checa se o player tem a permissão de entrar na base.
	
		addEventHandler("onMarkerHit", entrada, teleporte) 
	
	else
		outputChatBox("#FF0000Você não tem permissão para entrar!", thePlayer)
		return
	end
end
function teleporte(thePlayer)
	outputChatBox("#10E600 Teleportando...!")
	setElementPosition(thePlayer, 1480.7644042969, -1725.7329101563, 13.546875) -- Teleporta o player para dentro da base
end

createMarker()

--

[PT/BR]:

--

Eu tenho esse script, mas tenho um erro e um aviso, não sei como resolver...

ERROR: can't concatenate global 'accName' (a boolean value)(line 15).

WARNING: Bad Argument @ 'getAccountName' [Expected account at argument 1, got boolean] (line 12).

WARNING: Bad Argument @ 'getPlayerAccount' [Expected account at argument 1, got nil] (line 12).

--

[EN/US]:

--

I have this script, but i have an error and a warning, i don't know how to solve...

ERROR: can't concatenate global 'accName' (a boolean value)(line 15).

WARNING: Bad Argument @ 'getAccountName' [Expected account at argument 1, got boolean] (line 12).

WARNING: Bad Argument @ 'getPlayerAccount' [Expected account at argument 1, got nil] (line 12).

--

Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...