daniel735 Posted September 29, 2014 Share Posted September 29, 2014 hola amigos como hago para que este con este scrip cuando abra una puerta me diga abierto y cuando la cierre me diga cerrado local gate3 = createObject(10841, -1078.9000244141, -1647.3000488281, 83.199996948242, 0, 0, 267.99499511719 ) open = false function OpenObjectt ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "SOH" ) ) then if not open then moveObject(gate3, 1000, -1079, -1647.0999755859, 90.199996948242, 0, 0, 0 ) open = true elseif open then moveObject(gate3, 1000, -1078.9000244141, -1647.3000488281, 83.199996948242, 0, 0, 0 ) open = false end end end addCommandHandler("soh", OpenObjectt ) Link to comment
Bc# Posted September 29, 2014 Share Posted September 29, 2014 ¿Quieres un mensaje en el chat? Explícate. Link to comment
AlFA# Posted September 29, 2014 Share Posted September 29, 2014 ¿Quieres un mensaje en el chat? Explícate. Tienes que usar un outputChatbox, situalos debajo de los moveObject Link to comment
alex17 Posted September 29, 2014 Share Posted September 29, 2014 Aqui tienes editale el mensaje a tu gusto local gate3 = createObject(10841, -1078.9000244141, -1647.3000488281, 83.199996948242, 0, 0, 267.99499511719 ) open = false function OpenObjectt ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "SOH" ) ) then if not open then moveObject(gate3, 1000, -1079, -1647.0999755859, 90.199996948242, 0, 0, 0 ) open = true outputChatBox ( "#00FF00Abriendo Puerta", thePlayer, 255, 255, 255, true ) elseif open then moveObject(gate3, 1000, -1078.9000244141, -1647.3000488281, 83.199996948242, 0, 0, 0 ) open = false outputChatBox ( "#ff0000Cerrando Puerta", thePlayer, 255, 255, 255, true ) end end end addCommandHandler("soh", OpenObjectt ) Link to comment
daniel735 Posted September 30, 2014 Author Share Posted September 30, 2014 listo muchachos gracias me funciono ahora lo ultimo que necesito es que el scrip funcione con un grupo de una gang en ves de un grupo de acl Link to comment
alex17 Posted September 30, 2014 Share Posted September 30, 2014 prueva con esto no estoy seguro jamas he utilizado el gang_system local gate3 = createObject(10841, -1078.9000244141, -1647.3000488281, 83.199996948242, 0, 0, 267.99499511719 ) open = false function OpenObjectt ( thePlayer ) local gangName = getElementData ( thePlayer, "gang" ) if ( gangName =="SOH") then if not open then moveObject(gate3, 1000, -1079, -1647.0999755859, 90.199996948242, 0, 0, 0 ) open = true outputChatBox ( "#00FF00Abriendo Puerta", thePlayer, 255, 255, 255, true ) elseif open then moveObject(gate3, 1000, -1078.9000244141, -1647.3000488281, 83.199996948242, 0, 0, 0 ) open = false outputChatBox ( "#ff0000Cerrando Puerta", thePlayer, 255, 255, 255, true ) end end end addCommandHandler("soh", OpenObjectt ) Link to comment
daniel735 Posted September 30, 2014 Author Share Posted September 30, 2014 no funciono Link to comment
Recommended Posts