Jump to content

UserToDelete

Members
  • Posts

    766
  • Joined

  • Last visited

Everything posted by UserToDelete

  1. Ya se puede pagar cada servicio hasta 6 meses (con 30% de descuento) En todos los servicios, consulta como es en la pagina! https://www.cydrio.com/index.php?pg=comprar
  2. Zorro,se lo que scripteo en mi server , son elementData
  3. llamame loco, pero a mi no me va, y usamos el mismo script, no cambia absolutamente nada. sin embargo, aparece cambiado cuando me hago un getAllElementData, pero para el servidor, no lo cambia, que coño? Incluso reconecto usando un save system, y nada, que no me lo cambia realmente, desincronizacion? debe ser cosa de mi servidor
  4. Si pongo un element data inventado lo crea y lo cambia, sin embargo, los ya existentes parece no tener permisoss o llamalo X paara cambiarloss, y sin embargo los intento cambiar, y no, no tengo scripts que lo cambien, mañana pruebo mejor acerca de esto
  5. Hola a todos, Planteo un problema hoy, y resulta que estaba creando un script que tu le clicas a un player y te abre sus stats para reiniciar o cambiar alguna, todo bien, funciona perfecto, a excepcion, de que no cambia el valor del elementData, no tira error, ni nada. Quisiera saber yo por que Server Client local adminmanag = {} addCommandHandler("data", function (source) if hasObjectPermissionTo(source, "command.ban") then adminmanag[source] = true showCursor(source, true) end end ) addEventHandler("onPlayerClick", root, function (_,_, element) if adminmanag[source] then if isElement(element) then if getElementType(element) == 'player' then showCursor(source, false) triggerClientEvent(source, "data:view", source, element, getAllElementData(element)) adminmanag[source] = nil end end end end ) addEvent("data:mod", true) addEventHandler("data:mod", root, function (element_tochango, data, value) outputChatBox("RECIBIDO; "..tostring(data).." ; "..tostring(value).." ; "..tostring(element_tochango), root) if isElement(element_tochango) then setElementData(element_tochango, data, value) else outputChatBox("ERROR ELEMENT", root) end end ) local playerin local function gui () local screenW, screenH = guiGetScreenSize() ventana = guiCreateWindow((screenW - 484) / 2, (screenH - 457) / 2, 484, 457, "", false) guiWindowSetSizable(ventana, false) guiSetAlpha(ventana, 1.00) showCursor(true) botonguardar = guiCreateButton(10, 181, 213, 34, "Guardar data", false, ventana) guiSetFont(botonguardar, "clear-normal") guiSetProperty(botonguardar, "NormalTextColour", "FFAAAAAA") botonsalir = guiCreateButton(262, 181, 213, 34, "Salir sin guardar nada", false, ventana) guiSetFont(botonsalir, "clear-normal") guiSetProperty(botonsalir, "NormalTextColour", "FFAAAAAA") dataname = guiCreateMemo(182, 26, 293, 31, "", false, ventana) labeldata = guiCreateLabel(19, 36, 163, 17, "Data string", false, ventana) guiLabelSetHorizontalAlign(labeldata, "center", true) valuename = guiCreateMemo(185, 67, 290, 31, "", false, ventana) valuelabel = guiCreateLabel(19, 77, 163, 17, "Valor string", false, ventana) guiLabelSetHorizontalAlign(valuelabel, "center", true) datagrid = guiCreateGridList(10, 225, 465, 222, false, ventana) guiGridListAddColumn(datagrid, "data", 0.5) guiGridListAddColumn(datagrid, "value", 0.5) addEventHandler("onClientGUIClick", botonsalir, function () destroyElement(ventana) showCursor(false) end ) addEventHandler("onClientGUIClick", botonguardar, function () local data = guiGetText(dataname) local value = guiGetText(valuename) triggerServerEvent("data:mod", localPlayer, playerin, tostring(data), tostring(value)) playerin = nil showCursor(false) destroyElement(ventana) end ) guiSetInputMode("no_binds_when_editing") end addEvent("data:view", true) addEventHandler("data:view", root, function (element_clicked, tableElement) if isElement(element_clicked) then gui() playerin = element_clicked for k, v in pairs(tableElement) do local row = guiGridListAddRow (datagrid) guiGridListSetItemText(datagrid, row, 1, tostring(k), false, false) guiGridListSetItemText(datagrid, row, 2, tostring(v), false, false) end end end )
  6. Pienso implementarlo, pero piensa que no se pueden bajar mucho mas los precios, el mantenimiento tiene su coste Lo digo, porque si la transacción es mayor, perderías menos en la comisión que se agarra paypal. Por otra parte, hacete una imagen y te hago algo de publicidad en el grupo de facebook que administro. Hacelo con varios idiomas (Español, Inglés, Frances, Portugués y Ruso, si también puedes en árabe, no hay problema) Por esa razon estoy pensando en implementarlo y ideando en como puedo implementarlo, ya que como tu dices, cobran mucha menos comision pagar 3 meses del tiron, que un mes pagado 3 veces, aplicaré eso pronto
  7. Pienso implementarlo, pero piensa que no se pueden bajar mucho mas los precios, el mantenimiento tiene su coste
  8. Añadidos planes de 40 y 50 slots, respetando el precio, evidentemente. Extreme I y Extreme II añadidos por 2,5 y 3 USD respectivamente
  9. La misma posibilidad quee cualquier otro server, respecto a la devolucion por cancelacion del servicio, si, se devolveria todo lo que pagaras Pd, quizas entre
  10. Se refiere a la cantidad asignada por proceso de MTA server, no por maquina virtual
  11. Si la class es un elementData, por que no usas getElementData(source, "Class") == "Prostituta ??
  12. Este problema va en la seccion de scripting, por favor, respeta los subforos
  13. Si, de hecho el momento en el que no esté activo se mostrara en la pagina un fondo blanco sin nada, pero si, sigue activo, almenos hasta septiembre de este año (previsto) No descarto pasar a septiembre del 2017 o 2020
  14. Simplest than yours function refreshResource(res) if ( not res or not getResourceState(res) ) then return false end -- no given resource if ( not getResourceLoadFailureReason(res) == "" ) then return false end -- given resource failed to load local resourceName = getResourceName(res) local meta_file = ":"..resourceName.."/meta.xml" if ( not fileExists(meta_file) ) then return false end -- no meta file was found fileRename(meta_file, meta_file.."_") refreshResources() fileRename(meta_file.."_", meta_file) refreshResources() startResource(getResourceFromName(resourceName)) end By the way, your function would only properly work 1 time since it doesn't clear global variables and it'd only work with the resource where it's being loaded from. You are using refreshResources(),and your script don't work like refreshResource() must be. Anyway, needed integration with MTA:SA functions.
  15. La tent es una col? Como estas haciendo ese area? Y el orden en el script de hecha de menos
  16. Error, it is the same that refreshAll command refreshResource: MTA will check for changes in single resource
  17. This is the Lua solution Verified working local files = {} local Bytes = 0 addEventHandler("onResourceStart", resourceRoot, function() local meta = xmlLoadFile(":"..getResourceName(getThisResource()).."/meta.xml") if meta then for k,v in ipairs(xmlNodeGetChildren(meta)) do if fileExists(xmlNodeGetAttribute(v, "src")) then local file = fileOpen(xmlNodeGetAttribute(v, "src")) local _ = fileGetSize(file) Bytes = Bytes + _ files[xmlNodeGetAttribute(v, "src")] = _ fileClose(file) end end --print("+++++++ "..tostring(Bytes)) else return error("Could not find META") end end ) --USEFULL FUNCTION function refreshResource () local newBytes = 0 local meta = xmlLoadFile(":"..getResourceName(getThisResource()).."/meta.xml") if meta then for k,v in ipairs(xmlNodeGetChildren(meta)) do if fileExists(xmlNodeGetAttribute(v, "src")) then local file = fileOpen(xmlNodeGetAttribute(v, "src")) local _ = fileGetSize(file) newBytes = newBytes + _ fileClose(file) end end --print("+++++++ "..tostring(newBytes).." -- "..tostring(Bytes)) if newBytes ~= Bytes then restartResource(getThisResource()) end else return error("Could not find META"); end end addCommandHandler("refreshResource", refreshResource) But integration with MTA is necessary
  18. sometimes need to check if file has changed or not (without refreshall or restartResource) refreshAll not only check if meta has changed, check if ANY file has changed, we need refreshResource for that check
  19. Sometimes I forget to update a resource, or leave it for later in the subject that I do not want to use refreshAll to determine if a script has been modified to another (cause too much lag for each minute). This function is perfect to see some automated resources. is simply the union of refreshResources () with getThisResource () for C ++ developers should not be very difficult to do this i think C++ need this code to modify: i don't know nothing about C++ /root/MTA10_Server/mods/deathmatch/logic/CResource.cpp:660 bool CResource::HasResourceChanged () { string strPath; list < CResourceFile* > ::iterator iterf = m_resourceFiles.begin (); for ( ; iterf != m_resourceFiles.end (); iterf++ ) { if ( GetFilePath ( (*iterf)->GetName(), strPath ) ) { CChecksum checksum = CChecksum::GenerateChecksumFromFile ( strPath ); if ( ( *iterf )->GetLastChecksum() != checksum ) return true; // Also check if file in http cache has been externally altered CResourceFile* pResourceFile = *iterf; switch ( pResourceFile->GetType () ) { case CResourceFile::RESOURCE_FILE_TYPE_CLIENT_SCRIPT&#058; case CResourceFile::RESOURCE_FILE_TYPE_CLIENT_CONFIG: case CResourceFile::RESOURCE_FILE_TYPE_CLIENT_FILE: { string strCachedFilePath = pResourceFile->GetCachedPathFilename (); CChecksum cachedChecksum = CChecksum::GenerateChecksumFromFile ( strCachedFilePath ); if ( cachedChecksum != checksum ) return true; } break; default: break; } } } if ( GetFilePath ( "meta.xml", strPath ) ) { CChecksum checksum = CChecksum::GenerateChecksumFromFile ( strPath ); if ( checksum != m_metaChecksum ) return true; } return false; }
  20. Returns of executeSQLQuery() Returns a table with the result of the query if it was a SELECT query, or false if otherwise. In case of a SELECT query the result table may be empty (if there are no result rows). The table is of the form: { { colname1=value1, colname2=value2, ... }, { colname1=value3, colname2=value4, ... }, ... } function lo2() local mainMemo = executeSQLQuery("SELECT * FROM Info where info = '' LIMIT 1") informacion2 = mainMemo[1]["info"] triggerClientEvent (source, "viendoinfo", source, informacion2) end addEvent ("infl", true) addEventHandler ("infl", root, lo2) Last thing, your query is the same that local mainMemo = ""
×
×
  • Create New...