yaver123 Posted April 30, 2012 Share Posted April 30, 2012 Hola quiero saber si es posible que este comando solo los admins lo puedan usar o poner addCommandHandler ("gritar", gritar) quiero saber que cosa devo hacer para que solo admins lo usen Link to comment
yaver123 Posted April 30, 2012 Author Share Posted April 30, 2012 (edited) yo lo ise asi if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "supermoderadores" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "moderadores" ) ) then osea quedaria addCommandHandler ("gritar", gritar) if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "supermoderadores" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "moderadores" ) ) then ESTO ESTA BIEN? Edited April 30, 2012 by Guest Link to comment
iFoReX Posted April 30, 2012 Share Posted April 30, 2012 yo lo ise asiif isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) thenif isObjectInACLGroup ("user."..accountName, aclGetGroup ( "supermoderadores" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "moderadores" ) ) then osea quedaria addCommandHandler ("gritar", gritar)if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "supermoderadores" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "moderadores" ) ) then ESTO ESTA BIEN? addCommandHandler ("gritar", gritar) function gritar() if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "supermoderadores" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "moderadores" ) ) then ---Aqui lo que quieres hacer en la function end end end end Link to comment
mishael Posted April 30, 2012 Share Posted April 30, 2012 mota mira lo ise con un bicho esta bien? local message = "bicho aparece para matarlos" local red = 0 local green = 0 local blue = 0 local useHTMLcolors = true -- Default is true, If set to false message will be white, Unless you've changed the message colors! local skin=128 local weapon=33 local mode= "hunting" local team =Terrorist local interior=0 local dimension= 0 local rot= 90 local x = 179, 1881.3928222656 local y = -1325.0609130859 local z = 19.4921875 resourceRoot = getResourceRootElement() function Spawnbot1 () local outPutMsg = outputChatBox(message, getRootElement(), red, green, blue, useHTMLcolors) local bot = call (getResourceFromName("slothbot"), "spawnBot", x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) end addEventHandler ( "onResourceStart", resourceRoot, Spawnbot1 ) end) addCommandHandler ("bicho", bicho) function bicho() if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "supermoderadores" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "moderadores" ) ) then end lo probe pero no aparece ... Link to comment
Castillo Posted April 30, 2012 Share Posted April 30, 2012 Eso no tiene sentido mishael. Link to comment
iFoReX Posted April 30, 2012 Share Posted April 30, 2012 local message = "bicho aparece para matarlos" local red = 0 local green = 0 local blue = 0 local useHTMLcolors = true -- Default is true, If set to false message will be white, Unless you've changed the message colors! local skin=128 local weapon=33 local mode= "hunting" local team =Terrorist local interior=0 local dimension= 0 local rot= 90 local x = 179, 1881.3928222656 local y = -1325.0609130859 local z = 19.4921875 resourceRoot = getResourceRootElement() function Spawnbot1 () local outPutMsg = outputChatBox(message, getRootElement(), red, green, blue, useHTMLcolors) local bot = call (getResourceFromName("slothbot"), "spawnBot", x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), Spawnbot1 ) addCommandHandler ("bicho", bicho) function bicho() if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "supermoderadores" ) ) then if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "moderadores" ) ) then ---te falto rellenarlo aqui end end end end borra todos los locals ya q los locals creo q solo son el functions creo Link to comment
Edikosh998 Posted May 1, 2012 Share Posted May 1, 2012 No tiene nada que ver los local, como dijo Solid...no tiene sentido el codigo Link to comment
Recommended Posts