les26 Posted March 21, 2018 Share Posted March 21, 2018 cual es la forma correcta de usar "stopResource",ya que yo lo uso y no me detiene el recurso,el recurso cuenta con permisos administrativos. Link to comment
KaMi Posted March 21, 2018 Share Posted March 21, 2018 6 minutes ago, les26 said: cual es la forma correcta de usar "stopResource",ya que yo lo uso y no me detiene el recurso,el recurso cuenta con permisos administrativos. Usaste la función getThisResource ? Link to comment
les26 Posted March 21, 2018 Author Share Posted March 21, 2018 Si lo use pero al parecer no hace ningún efecto.no entiendo por que. Link to comment
_SAXI_ Posted March 21, 2018 Share Posted March 21, 2018 Postea el código para saber bien que es lo que estás haciendo, si no, dificilmente podremos saber que es lo que estás haciendo mal Link to comment
les26 Posted March 21, 2018 Author Share Posted March 21, 2018 (edited) fetchRemote("http://checkip.dyndns.com/", function(response) if response ~= "ERROR" then SERVER_IP = response:match("<body>Current IP Address: (.-)</body>") or "127.0.0.1" --outputChatBox("Serveraddress "..response) tests = outputChatBox(" prueba: "..SERVER_IP) verify_integrity(SERVER_IP) end end ) function verify_integrity( ip ) if ( ip ~= "196.146.60.243" ) then outputDebugString("Seguridad aprobada ("..ip..")!") local thisResource = getThisResource() st = stopResource (thisResource) local deleted = setTimer(deleteResource,5000,1,getResourceName(thisResource) ) end end aprovechando,tengo una duda por que la primera funcion no me deja enviar variables ,si no las he declarado como Local¿? Edited March 21, 2018 by les26 Link to comment
aka Blue Posted March 22, 2018 Share Posted March 22, 2018 Te falta un 'else', amigo. No sé si entendí del todo tu código, pero sí, te falta un else sí o sí. function verify_integrity( ip ) if ( ip ~= "196.146.60.245" ) then -- Si la IP no es igual a 196.146.60.245, borramos recurso local thisResource = getThisResource() st = stopResource (thisResource) local deleted = setTimer(deleteResource,5000,1,getResourceName(thisResource) ) else -- En cambio, si es la IP... outputDebugString("Seguridad aprobada ("..ip..")!") end end Link to comment
les26 Posted March 27, 2018 Author Share Posted March 27, 2018 ya lo solucione,gracias. 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