Jump to content

Mr.Aleks

Members
  • Posts

    178
  • Joined

  • Last visited

Everything posted by Mr.Aleks

  1. ¿Estás usando Dayz compliado no? En ese caso dudo que puedas editar ningún archivo.
  2. En teoría si todo está bien configurado, la fuente debería crearse, ahora te toca comprobar ( desconozco la función de dxText:create que usas) si los argumentos de esa función están bien puestos, porque la fuente está bien creada.
  3. I have this: players[player]["text"] = "Hello, this is the text" Then, I do this: texts = toJSON(players[player]) But in the mysql database it shows like this: [{"text":"Hello,thisisthetext"}] how can I save it with the spaces? SOLVED: Close the topic.
  4. What I want to do is to get some information about the character when you create it, encode it into JSON ( because there are some arrays ) and upload it into a database. Once it's upload I want to get this information with php. Some of the code: Lua: ( the table and how I upload it to the mysql, but there are no errors with it. I mean, it uploads all right. ) -- the table is this one: players[source] = { ["id"] = data.id, ["user"] = data.user, ["pass"] = data.pass, ["nombre"] = nombre, ["apellido"] = apellido, ["edad"] = edad, ["altura"] = altura, ["peso"] = peso, ["skin"] = skin, ["sexo"] = sexo, ["dinero"] = 200, ["salud"] = 100, ["chaleco"] = 0, ["armas"] = amras, ["andar"] = style, ["estado"] = 1, ["pos"] = { ["x"]=64.80078125, ["y"]=-234.880859375, ["z"]=1.5723714828491, ["dimension"]=0, ["interior"]=0}, ["staff"] = { ["admin"] = 0, ["mod"] = 0, ["go"] = 0 } } --then I encode it with: info = toJSON(players[source]) --and I upload it with: local u = exports.sql:query_free( "UPDATE usuarios SET info = '%s' WHERE user ='%s'", info, data.user ) When I upload this I look in the database if it's well created and it's like this: [ { "altura": 170, "peso": 75, "nombre": "NAME", "chaleco": 0, "skin": 25, "edad": 22, "salud": 100, "apellido": "GARCIA", "user": "theuser", "id": 1, "pass": "thepass", "staff": { "mod": 0, "admin": 0, "go": 0 }, "sexo": "Hombre", "estado": 1, "armas": "NULL", "dinero": 200, "pos": { "y": -234.880859375, "x": 64.80078125, "z": 1.5723714828491211, "interior": 0, "dimension": 0 } } ] Then, when the player login in the website, I get the INFO: ... $id = mysqli_query($conex,'SELECT * FROM usuarios WHERE user ="'.mysqli_real_escape_string($conex, $user).'"'); if ($id) { while($row = mysqli_fetch_array($id, MYSQLI_ASSOC)) { $_SESSION['info'] = $row['info']; ... then, I call '$_SESSION['info']' in the file I want to get the information and I use it like this: $json1 = $_SESSION['info']; $json = json_decode($json1, true); $charname = "".$json->{'nombre'}."_".$json->{'nombre'}; but the '$json->{'nombre'}' and the $json->{'apellido'} dont return what they should return, and I don't know what's the problem. EDIT: I find the solution, php doesn't read the ''['' '']'' and I had to replace them. Now it gets the information. Tanks for everything.
  5. Hi! I've done a script in which i have encoded a table into JSON ans then i upload it into the mysql. The problem is that when i try to decode it with php, it doesnt work. Both scripts work fine Idk if its a problem of the Json-decode function for php or what... if someone knows how to do this..
  6. As Asus has said that gamemode is not Paradise, maybe it's similar because we get some ideas from Paradise, but it is not Paradise. This is not your gamemode and I don't think we have given permission to sell it.
  7. I have AVG but I don't use it (It is disabled) I use McAfee LiveSafe- Internet Security
  8. It has given me a WordPad file. Download it here : http://www.mediafire.com/view/y7pnsutwd ... -33-17.txt
  9. I've tried to disable firewall but nothing changes
  10. I bought a new PC and when I open MTA, it doesn't connect to any server. Nothing appear in server browser and when I try to join any server using the ip it doesn't connect. I've tried a lot of things but it doesn't work. I don't know what to do.
  11. Bueno pues me compré un PC nuevo y el problema es que al instalar MTA y abrirlo, no me conecta a internet, y cuando digo que no me conecta, me refiero a que no sale ningún servidor en la lista de servidores, ni me conecta a ningún servidor introduciendo la IP directamente ni nada. He probado a darle permisos de conexión en el antivirus, he probado desactivando el firewall, he probado en reinstalarlo y sigue igual. No sé que más probar, si me dan alguna idea, gracias.
  12. Mr.Aleks

    MySQL

    Podes conectar la web y el servidor a la misma base de datos mysql usando php.
  13. Hasta hace poco estuvo apoyándonos en unas cosas, pero luego se quedó inactivo y sigue en ese camino. Como él mismo dijo no creo que siga con este proyecto.
  14. You can't use "player" if you are using "source" as the element, check it out.
  15. Capaz lo hizo él y nos estamos equivocando todos.
  16. Muchos servidores usando el mismo gamemode hace que la gente que busca novedades no la encuentre en ninguno, así que de poco sirve usar paradise, que usar alguno de los gamemodes que se vendieron, al fin y al cabo todos tienen lo mismo y no hay nada que cambie.
  17. Abres el archivo que te dijo Tomas con un notepad y ahí te dice lo que debes hacer.
  18. Con guiGetText agarras el texto que introducen en el editbox y lo comparas con la contraseña que quieras, si es igual hará una cosa, y si no lo es hará otra.
  19. Al bajártelo te viene un archivo donde te enseña perfectamente como instalarlo.
  20. "AddEventHandler" no existe, la "a" es minúscula.
×
×
  • Create New...