eldelahoz Posted October 23, 2013 Share Posted October 23, 2013 Hola una pregunta como puedo hacer para que una puerta se mueva para un usuario solamente por medio de acl Link to comment
Castillo Posted October 23, 2013 Share Posted October 23, 2013 Usa: isObjectInACLGroup Link to comment
eldelahoz Posted October 23, 2013 Author Share Posted October 23, 2013 tengo este pero no ce si sirve local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName ) then Link to comment
Rockero Posted October 23, 2013 Share Posted October 23, 2013 Mas exactamente algo como esto local accName = getAccountName ( getPlayerAccount ( source) ) -- Tomar la cuenta if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- Tiene esta persona permisos de admin Link to comment
eldelahoz Posted October 23, 2013 Author Share Posted October 23, 2013 pero yo no quiero para un grupo lo quiero para un solo usuario Link to comment
Castillo Posted October 23, 2013 Share Posted October 23, 2013 Entonces usa la cuenta? Link to comment
eldelahoz Posted October 23, 2013 Author Share Posted October 23, 2013 se pues el objeto ejemplo user.eldelahoz Link to comment
Castillo Posted October 23, 2013 Share Posted October 23, 2013 Entonces usa: if ( accName == "eldelahoz" ) then -- Haces algo aqui. end Link to comment
eldelahoz Posted October 23, 2013 Author Share Posted October 23, 2013 Bueno acabo de probarlo y no me da lo tengo asi function Funcion1 (source) if ( accName == "DelaHoz" ) then moveObject ( objeto1, 2000, -1186.099609375, -157.3994140625, 22, 0, 0, 0 ) outputChatBox ( "Bienvenido", source, 0, 255, 0, true ) else outputChatBox ( "Tu no eres el Dueño!", source, 255, 0, 0, true ) end end addEventHandler ( "onColShapeHit", Zona1, Funcion1 ) function Funcion2 () moveObject ( objeto1, 2000, -1186.099609375, -157.3994140625, 15.89999961853, 0, 0, 0 ) outputChatBox ( "Abandonando Base!"..Zona1, source, 0, 255, 0, true ) end addEventHandler ( "onColShapeLeave", Zona1, Funcion2 ) Link to comment
El-Saka# Posted October 23, 2013 Share Posted October 23, 2013 function Funcion1 (source) local accName = getAccountName ( getPlayerAccount ( source) ) if ( accName == "DelaHoz" ) then moveObject ( objeto1, 2000, -1186.099609375, -157.3994140625, 22, 0, 0, 0 ) outputChatBox ( "Bienvenido", source, 0, 255, 0, true ) else outputChatBox ( "Tu no eres el Dueño!", source, 255, 0, 0, true ) end end addEventHandler ( "onColShapeHit", Zona1, Funcion1 ) function Funcion2 () moveObject ( objeto1, 2000, -1186.099609375, -157.3994140625, 15.89999961853, 0, 0, 0 ) outputChatBox ( "Abandonando Base!"..Zona1, source, 0, 255, 0, true ) end addEventHandler ( "onColShapeLeave", Zona1, Funcion2 ) Link to comment
eldelahoz Posted October 23, 2013 Author Share Posted October 23, 2013 Ok gracias pero me tira error que el getaccount name Excepted account at argument 1,got boolean Link to comment
Castillo Posted October 23, 2013 Share Posted October 23, 2013 function Funcion1 ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if ( accName == "DelaHoz" ) then moveObject ( objeto1, 2000, -1186.099609375, -157.3994140625, 22, 0, 0, 0 ) outputChatBox ( "Bienvenido", hitElement, 0, 255, 0, true ) else outputChatBox ( "Tu no eres el Dueño!", hitElement, 255, 0, 0, true ) end end end addEventHandler ( "onColShapeHit", Zona1, Funcion1 ) function Funcion2 ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) then moveObject ( objeto1, 2000, -1186.099609375, -157.3994140625, 15.89999961853, 0, 0, 0 ) outputChatBox ( "Abandonando Base!".. Zona1, leaveElement, 0, 255, 0, true ) end end addEventHandler ( "onColShapeLeave", Zona1, Funcion2 ) Link to comment
eldelahoz Posted October 23, 2013 Author Share Posted October 23, 2013 Muchas Gracias Link to comment
Recommended Posts