FroidHub Posted November 1, 2020 Share Posted November 1, 2020 (edited) 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 November 1, 2020 by FroidHub attempt to concatenate local "accName" (a boolean value) tentativa de concatenar "accName" local (um valor booleano) Link to comment
Administrators Tut Posted November 1, 2020 Administrators Share Posted November 1, 2020 Thread's moved to the Portuguese language forum. Link to comment
DNL291 Posted November 1, 2020 Share Posted November 1, 2020 Esse trecho não tem 'accName' em nenhum lugar e seu código foi colado do google tradutor, publique o código do erro mencionado. 1 1 Link to comment
FroidHub Posted November 3, 2020 Author Share Posted November 3, 2020 Então tipo é só remover o accName que vai parar de Floodar no Debug ? Link to comment
Gustavo Freire Posted November 3, 2020 Share Posted November 3, 2020 (edited) 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 November 3, 2020 by Gustavo Freire 1 Link to comment
Other Languages Moderators Lord Henry Posted November 3, 2020 Other Languages Moderators Share Posted November 3, 2020 (edited) @Gustavo FreireVai dar erro em Moveobject, essa função não existe. Edited November 3, 2020 by Lord Henry 2 Link to comment
FroidHub Posted November 6, 2020 Author Share Posted November 6, 2020 On 03/11/2020 at 11:53, Gustavo Freire said: O código que você postou foi traduzido para português dificultando a te ajudar mas tenta isso: não funciona Link to comment
Gustavo Freire Posted November 6, 2020 Share Posted November 6, 2020 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 1 Link to comment
Angelo Pereira Posted November 6, 2020 Share Posted November 6, 2020 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
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