crowley bcc Posted June 1, 2020 Posted June 1, 2020 bom ta tendo uma quantidade enorme de erro no meu serve como esses e todos eles são esse mesmo erro envolvendo 'getPlayerAccount 'getAccountName' não sei se e a falta de um banco de dados se alguem puder me ajudar WARNING: [CORPS]/[BOPE]/[BOPE]Map2/gatescript.Lua:5: Bad argument @ 'getPlayerAccount' [Expected player or console at argument 1, got vehicle] WARNING: [CORPS]/[BOPE]/[BOPE]Map2/gatescript.Lua:5: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] ERROR: [CORPS]/[BOPE]/[BOPE]Map2/gatescript.Lua:5: attempt to concatenate a boolean value local gate = createObject(980, 1810.9000244141, -1891.1999511719, 15.39999961853, 0, 0, 90) local marker = createMarker(1810.9000244141, -1891.1999511719, 9.6000003814697, "cylinder", 8, 0, 0, 0, 0) function moveGate(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)) , aclGetGroup("BOPE")) then moveObject(gate, 3000, 1810.9000244141, -1891.1999511719, 9.6000003814697) end end addEventHandler("onMarkerHit", marker, moveGate) function move_back_gate() moveObject(gate, 3000, 1810.9000244141, -1891.1999511719, 15.39999961853) end addEventHandler("onMarkerLeave", marker, move_back_gate)
Tommy. Posted June 1, 2020 Posted June 1, 2020 usa o getElementType pra verificar se o thePlayer é um player e usa o isGuestAccount para verificar se o jogador está logado em alguma conta
Other Languages Moderators Lord Henry Posted June 1, 2020 Other Languages Moderators Posted June 1, 2020 Ele está reclamando que thePlayer não é um jogador. Isso acontece quando vc colide no marker com um veículo ou qualquer outro objeto que não seja um jogador. Em vez disso, faça a função assim: function moveGate (hitElement, matchingDimension) if (getElementType (hitElement) == "player" and matchingDimension) then -- Se o elemento que colidiu no marker for um jogador e ele estiver na mesma dimensão que o marker, então: if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (hitElement)) , aclGetGroup("BOPE")) then -- Se o jogador que colidiu no marker estiver na ACL Group BOPE, então: moveObject (gate, 3000, 1810.9, -1891.2, 9.6) -- Move o portão para essa posição. end end end addEventHandler ("onMarkerHit", marker, moveGate)
Blaack Posted June 2, 2020 Posted June 2, 2020 local gate = createObject(980, 1810.9000244141, -1891.1999511719, 15.39999961853, 0, 0, 90) local marker = createMarker(1810.9000244141, -1891.1999511719, 9.6000003814697, "cylinder", 8, 0, 0, 0, 0) function moveGate(hitElement) if getElementType( hitElement ) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitElement)) , aclGetGroup("BOPE")) then moveObject(gate, 3000, 1810.9000244141, -1891.1999511719, 9.6000003814697) end end end addEventHandler("onMarkerHit", marker, moveGate) function move_back_gate() moveObject(gate, 3000, 1810.9000244141, -1891.1999511719, 15.39999961853) end addEventHandler("onMarkerLeave", marker, move_back_gate)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now