Jump to content

me ajudem a Resolver um problema no Debugscript fica dandoattempt to concatenate local "accName" (a boolean value) tentativa de concatenar "accName" local (um valor booleano)


Recommended Posts

local gate = createObject (16775, 2532, -1514.5999755859, 27.10000038147, 0, 0, 0)
local marker = createMarker (2532, -1514.5999755859, 27.10000038147, "cilindro", 8, 0, 0, 0, 0) 
  
função moveGate (thePlayer ) 
     se isObjectInACLGroup ( "utilizador." .. getAccountName (getPlayerAccount (theplayer)), aclGetGroup ( "CV")), em seguida, 
          Moveobject (portão, 1900, 2532, -1.514,5999755859, 18,89999961853)
     extremidade 
final 
AddEventHandler ( "onMarkerHit", marcador, moveGate ) 
  
function move_back_gate () 
     moveObject (gate, 1900, 2532, -1514.5999755859, 27.10000038147, 0, 0, 0) 
end 
addEventHandler ("onMarkerLeave", marcador, move_back_gate)

Edited by FroidHub
attempt to concatenate local "accName" (a boolean value) tentativa de concatenar "accName" local (um valor booleano)
Link to comment
  • FroidHub changed the title to me ajudem a Resolver um problema no Debugscript fica dandoattempt to concatenate local "accName" (a boolean value) tentativa de concatenar "accName" local (um valor booleano)

O código que você postou foi traduzido para português dificultando a te ajudar mas tenta isso: 

 

local gate = createObject (16775, 2532, -1514.5999755859, 27.10000038147, 0, 0, 0)
local marker = createMarker (2532, -1514.5999755859, 27.10000038147, "cylinder", 8, 0, 0, 0, 0) 
  
function moveGate (thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
   if isObjectInACLGroup ("user."..accName, aclGetGroup ( "CV" ) ) then
   	Moveobject (gate, 1900, 2532, -1.514,5999755859, 18,89999961853)
  end 
end 
addEventHandler ( "onMarkerHit", root, moveGate ) 
  
function move_back_gate () 
     moveObject (gate, 1900, 2532, -1514.5999755859, 27.10000038147, 0, 0, 0) 
end 
addEventHandler ("onMarkerLeave", root, move_back_gate)

 

Edited by Gustavo Freire
  • Thanks 1
Link to comment
local gate = createObject (16775, 2532, -1514.5999755859, 27.10000038147, 0, 0, 0)
local marker = createMarker (2532, -1514.5999755859, 27.10000038147, "cylinder", 8, 0, 0, 0, 0) 
  
function moveGate (thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
   if isObjectInACLGroup ("user."..accName, aclGetGroup ( "CV" ) ) then
   	moveObject(gate, 1900, 2532, -1.514,5999755859, 18,89999961853)
  end 
end 
addEventHandler ( "onMarkerHit", root, moveGate ) 
  
function move_back_gate () 
     moveObject(gate, 1900, 2532, -1514.5999755859, 27.10000038147, 0, 0, 0) 
end 
addEventHandler ("onMarkerLeave", root, move_back_gate)

tenta isso, lembrando que você deve estar na acl CV

  • Like 1
Link to comment

Deixar o evento como root neste caso, qualquer marker que o usuário colidir no servidor, abrirá o portão.

Então, faça :

local gate = createObject (16775, 2532, -1514.5999755859, 27.10000038147, 0, 0, 0)
local marker = createMarker (2532, -1514.5999755859, 27.10000038147, "cylinder", 8, 0, 0, 0, 0) 
  
function moveGate ( hitElement ) 
   if isElement(hitElement) and getElementType(hitElement) == "player" then
      local accName = getAccountName ( getPlayerAccount ( hitElement ) )
      if isObjectInACLGroup ("user."..accName, aclGetGroup ( "CV" ) ) then
         moveObject(gate, 1900, 2532, -1.514,5999755859, 18,89999961853)
      end
   end 
end 
addEventHandler ( "onMarkerHit", marker, moveGate ) 
  
function move_back_gate ( hitElement ) 
   if isElement(hitElement) then
      moveObject (gate, 1900, 2532, -1514.5999755859, 27.10000038147, 0, 0, 0) 
   end
end 
addEventHandler ("onMarkerLeave", marker, move_back_gate)

 

Link to comment

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...