Jump to content

UserToDelete

Members
  • Posts

    766
  • Joined

  • Last visited

Everything posted by UserToDelete

  1. addEventHandler("onChatMessage",root, function (mensaje) outputChatBox(tostring(mensaje),root,255,255,255,true) end ) [2014-06-27 16:02:51] Resource 'vDscript' changed while running, reloading and restarting [2014-06-27 16:02:51] Stopping vDscript [2014-06-27 16:02:51] New resource 'vDscript' loaded [2014-06-27 16:02:51] Resources: 1 loaded, 0 failed [2014-06-27 16:02:51] Starting vDscript [2014-06-27 16:02:51] ERROR: vDscript\xmlNodes.lua:96: C stack overflow [2014-06-27 16:02:51] vDscript build: 39 Lo que intentçe hacer es que al "enviar un mensaje el jugador" quede en blanco, pero me da stack y nose como hacerlo
  2. Lo que no me quedó claro de todo esto es: 1. 1 IP con 10 puertos de 1 GiB cada uno 2. 10 IPs con 1 puerto de 1 GiB cada uno sea como sea, no pueden ser 10 GiB en un solo servidor (puerto), es decir, si abres (por poner un ejemplo) 120 servidores en un dedicado (los cuales aguanta perfectamente), son 83 MiB por servidor, pero si creo que es de la otra manera, y son 10 IPs y 1 GiB en cada uno de ellos, solo seria 8,3 MiB por segundo / servidor, como funciona exactamente el "sistema de placas de red" Por favor, responde sin faltas de ortografía si te es posible, ya que me cuesta mucho leerlas. Gracias
  3. un momento... Como se usa IPB, es decir, como se abre?
  4. Es hosteado? 1. Si 2. No El script esta en .zip? 1. Si 2. No Sobre que OS esta montado? 1. Windows 2. Linux El script funcionaba correctamente en tu anterior server? 1. Si 2. No Has cambiado la version de servidor de MTA, (respecto a el anterior servidor que tuviste) 1. Si 2. No
  5. El problema es que las tablas no tienen la posibilidad de or Ni se utilizar bien las tablas en lua (en este tipo de function) mE = { "hola","hola" } for men,res in ipairs(mE) do
  6. try to make a simple face in a anytype CODE box Example: the line is: "outputChatBox(tg.."Adios ! :D",source,255,255,255,true)" outside of code, i understand the "transformation to icon", but in code box... , ok, now, i try to post "faces" in the code outputChatBox(tg.."Adios ! <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->",source,255,255,255,true) outputChatBox(tg.."Adios ! \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />",source,255,255,255,true) make a filter for that, noup?
  7. Tushé, no habia caido yo en eso, al ver que tenia un comparador, me cegué, Ahora si funciona. Gracias! ;D tg = "#ffffffvD-#666666bot:#ffffff " function chatBot (m,t) if (string.find(string.lower(m), "hola")) or (string.find(string.lower(m), "ola")) then outputChatBox(tg.."Hola",source,255,255,255,true) elseif (string.find(string.lower(m), "que tal?")) or (string.find(string.lower(m), "que tal?"))then outputChatBox(tg.."Yo estoy bien, y tu?",source,255,255,255,true) elseif (string.find(string.lower(m), "adios")) or (string.find(string.lower(m),"chao")) then outputChatBox(tg.."Adios ! \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />",source,255,255,255,true) else outputChatBox(tg.."No te entiendo",source,255,255,255,true) end end function chatAlert () outputChatBox("[vD.bot] activo, puedes decirle 'Hola' para empezar",source,255,255,255,true) end addEventHandler("onPlayerChat",root,chatBot) addEventHandler("onPlayerJoin",root,chatAlert) addEventHandler("onResourceStart",root,chatAlert) --[[ Help from: - venadHD - renkon ]] HAHAHHAHAHHAA notificare este bug: outputChatBox(tg.."Adios ! \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />",source,255,255,255,true)
  8. string.find(m,"hola") --asi, no? --string.find (s, pattern [, init [, plain]]) me da que nose usar esa linea; tg = "#ffffffvD-#666666bot:#ffffff " function chatBot (m,t) if string.lower(m) == string.find(m,"hola") or string.lower(m) == string.find(m,"ola") then outputChatBox(tg.."Hola",source,255,255,255,true) elseif string.lower(m) == "que tal" or string.lower(m) == "que tal?" then outputChatBox(tg.."Yo estoy bien, y tu?",source,255,255,255,true) else outputChatBox("No te entiendo",source,255,255,255,true) end end function chatAlert () outputChatBox("[vD.bot] activo, puedes decirle 'Hola' para empezar",source,255,255,255,true) end addEventHandler("onPlayerChat",root,chatBot) addEventHandler("onPlayerJoin",root,chatAlert) me salta "else"
  9. Me queda otra cosa, como puedo hacer para que "detecte el mensaje" y "si hay en una parte del mensaje "hola" que responda con hola", por ejemplo tuve este problema: [2014-06-18 19:50:16] [Output] : '~'VeNaD: Hola [2014-06-18 19:50:16] [Output] : No te entiendo [2014-06-18 19:50:17] [Output] : '~'VeNaD: Hola [2014-06-18 19:50:17] [Output] : vD-bot: Hola [2014-06-18 19:50:19] [Output] : '~'VeNaD: hola [2014-06-18 19:50:19] [Output] : vD-bot: Hola [2014-06-18 19:50:24] [Output] : '~'VeNaD: qUe TaL [2014-06-18 19:50:24] [Output] : vD-bot: Yo estoy bien, y tu? [2014-06-18 19:50:28] [Output] : '~'VeNaD: Que tal? [2014-06-18 19:50:28] [Output] : vD-bot: Yo estoy bien, y tu? Al decir "Hola xD" el bot tendria que haber respondido con "Hola", como debo hacerle? tg = "#ffffffvD-#666666bot:#ffffff " function chatBot (m,t) if string.lower(m) == "hola" or string.lower(m) == "ola" then outputChatBox(tg.."Hola",source,255,255,255,true) elseif string.lower(m) == "que tal" or string.lower(m) == "que tal?" then outputChatBox(tg.."Yo estoy bien, y tu?",source,255,255,255,true) else outputChatBox("No te entiendo",source,255,255,255,true) end end function chatAlert () outputChatBox("[vD.bot] activo, puedes decirle 'Hola' para empezar",source,255,255,255,true) end addEventHandler("onPlayerChat",root,chatBot) addEventHandler("onPlayerJoin",root,chatAlert
  10. Tengo un script que habla con los jugadores como si fuera el cleverbot Pero al poner "que tal" o alguna frase que no este en el script, sigue soltando "Hola" por cada mensaje que pongo, a que se debe? --[[ t = type 0: normal message 1: action message (/me) 2: team message m = message ]] tg = "#ffffffvD-#666666bot:#ffffff " function chatBot (m,t) string.lower(m) if m == "hola" or "ola" then outputChatBox(tg.."Hola",source,255,255,255,true) elseif m == "que tal" or "que tal?" then outputChatBox(tg.."Yo estoy bien, y tu?",source,255,255,255,true) else outputChatBox("No te entiendo",source,255,255,255,true) end end function chatAlert () outputChatBox("[vD.bot] activo, puedes decirle 'Hola' para empezar",source,255,255,255,true) end addEventHandler("onPlayerChat",root,chatBot) addEventHandler("onPlayerJoin",root,chatAlert)
  11. Eso es claramente, que: 1. El archivo esta dañado 2. El archivo no es compatible 3. Tendra "ñ" o algun caracter especial 4. Puede que tenga separaciones como "blista compact.dff" en vez de "blista_compact.dff" pero opto por la primera opcion..
  12. ejem... solo e preguntado por la linea de como cerrarla y como poner el boton a la izquierda no de "problemas con el script", de todas maneras, lo que buscaba era esto: gracias a #BC por responder a lo que he preguntado El problema es que ahora, al clickar en cualquier parte de la ventana, se cierra. rootRes = getResourceRootElement(getThisResource()) function panelDeJugador (jugadorL) ventana = guiCreateWindow(100,100,600,350,"Test de ventanita",false) botonSalir = guiCreateButton(0.01,0.9,0.30,0.1,"cerrar",true,ventana) addEventHandler("onClientGUIClick", botonSalir, salidFuncion) guiWindowSetMovable (ventana, true) showCursor(true) end function salidFuncion () guiSetVisible(ventana,false) showCursor(false) end addCommandHandler("panel",panelDeJugador) PD: ya arregle el problema de el boton a la izquierda: guiCreateButton(0.01,0.9,0.30,0.1...
  13. rootRes = getResourceRootElement(getThisResource()) function panelDeJugador (jugadorL) local ventana = guiCreateWindow(1,1,0.9,0.9,"Test de ventanita",false) local botonSalir = guiCreateButton(0.2,0.2,0.4,0.4,"cerrar",true,ventana) guiWindowSetMovable (ventana, true) showCursor(true) end function salidFuncion () guiSetVisible(ventana,false) showCursor(false) end addEventHandler("onClientGUIClick", salidFuncion, botonSalir) addEventHandler("onClientResourceStart", rootRes, panelDeJugador) El problema es que no recuerdo la "linea" para que el darle al boton cerrara la GUI. y otra pregunta: Como hago para que el boton este en la derecha en vez de la izquierda?
  14. Cada uno se va por su lado. Estamos hablando de LA ENCRIPTACION DE LAS CONTRASEÑAS No es la misma la de un foro que la de MTA, ahi es donde esta el problema
  15. Podrias simplificar mas tu script de server-side
  16. No, no se puede, al igual que tampoco puedes crear nuevas armas, tampoco vehiculos.
  17. En vez de incluir un infinite, incluye un timer con 50 ms, no se "petaria" el server y Lua y MTA no lo aborta
  18. Solucionado con un script de wiki.. cuando el mio era exactamente igual, no funciona.. Thsé function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in local playermoney = getPlayerMoney ( source ) -- get the player money setAccountData ( playeraccount, "piraterpg.money", playermoney ) -- save it in his account end end function onPlayerLogin (_, playeraccount ) -- when a player logins, retrieve his money amount from his account data and set it if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "piraterpg.money" ) -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( playermoney ) then setPlayerMoney ( source, playermoney ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
  19. Creo que me dijiste que el script no guarda el dinero porque al des-loggearse pierde la cuenta y por tanto el script no puede obtener el nombre, Ahora ya es el problema, Pero no hay un evento para esto, es decir, si no sirve "onPlayerQuit" porque pierde el nombre de la cuenta, y no sirve "onPlayerLogout" porque tambien la pierde, como puedo hacer? Edit: onAccountDataChange?
  20. UserToDelete

    Bugs :(

    if check==false then destroyElement(vehicle) end Seguro que está bien definido "vehicle"?
  21. El problema del script inicial que pusiste era que el timer solo se iniciaba al iniciar el recurso, en cambio, deberias ponerlo para que se ejecutara cuando el jugador entra al servidor
  22. Ya veo por donde tiras, sugieres un Timer para la funcion de saveQuit y borrar saveLogout??
  23. está definido, pero sigo con el problema de que no guarda el dinero --[[ SAVE SYSTEM ]] function SaveLogout () local nombrepll = getPlayerName(source) local account = getPlayerAccount(source) if account then local playermoney = getPlayerMoney(source) setAccountData (account,"vd.money",tostring(playermoney)) outputChatBox("#00FF00[sAVE SYSTEM] Saved data #FFFFFF'"..nombrepll.."'#00FF00 for your account",source,0,255,0,true) end end function SaveQuit () local nombrepll = getPlayerName(source) local account = getPlayerAccount(source) if account then local playermoney = getPlayerMoney(source) setAccountData (account,"vd.money",tostring(playermoney)) end end function SaveJoin (_,account) local nombrepll = getPlayerName(source) local account = getPlayerAccount(source) if account then local playermoney = getAccountData(account,"vd.money") outputChatBox("#00FF00[sAVE SYSTEM] Loaded data #FFFFFF"..nombrepll.."#00FF00 for your account",source,0,255,0,true) setPlayerMoney(source,tostring(playermoney)) end end addEventHandler("onPlayerLogout",root,SaveLogout) addEventHandler("onPlayerQuit",root,SaveQuit) addEventHandler("onPlayerLogin",root,SaveJoin) --exquisitos con el local
  24. function SaveLogout () local account = getPlayerAccount(source) if account then local playermoney = getPlayerMoney(source) setAccountData (account,"vd.money",tostring(playermoney)) outputChatBox("#00FF00[sAVE SYSTEM] Saved data #FFFFFF'"..nombrepll.."'#00FF00 for your account",source,0,255,0,true) end end function SaveQuit () local account = getPlayerAccount(source) if account then local playermoney = getPlayerMoney(source) setAccountData (account,"vd.money",tostring(playermoney)) end end function SaveJoin (_,account) local account = getPlayerAccount(source) if account then local playermoney = getAccountData(account,"vd.money") outputChatBox("#00FF00[sAVE SYSTEM] Loaded data #FFFFFF"..nombrepll.."#00FF00 for your account",source,0,255,0,true) setPlayerMoney(source,tostring(playermoney)) end end addEventHandler("onPlayerLogout",root,SaveLogout) addEventHandler("onPlayerQuit",root,SaveQuit) addEventHandler("onPlayerLogin",root,SaveJoin) No guarda el dinero, pero si lo carga
×
×
  • Create New...