Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Go to the phpMyAdmin and give access to your IP.
  2. Well, then whoever wrote it, was wrong. You must put the IP for the mysql server.
  3. Then why do you put 'localhost' as host?
  4. Find that user you put on mysql.lua and grant all privelegies to it.
  5. Castillo

    Stats system

    Do this: Save one data at once, until you find which is causing the error.
  6. Podes guardar un dato en su cuenta ( tienen que estar logueados ), y al entrar, cada ves verificas, y ahi mostras el spawn. Deberias usar: getAccountData setAccountData
  7. Well, seems like user: "a2480772_nhunor5" has to privilegies to connect.
  8. Should be on "Users" tab.
  9. I use this compiler: https://forum.multitheftauto.com/viewtop ... 08&t=33905
  10. So, because you didn't like it, you removed it? is that a joke or what? you can't remove what connects to mysql. Download mta paradise again, set the details on the mysql.lua of your mysql server and should work.
  11. That can't be all the content, I remember it had a lot more inside.
  12. All the content of "mysql.lua".
  13. You must grant all privilegies to your IP on phpMyAdmin if I'm right.
  14. -- Create Peds.xml and insert tags -- function createFileHandler ( ) local file = xmlCreateFile ( "peds/peds.xml", "peds" ) xmlSaveFile ( file ) end addCommandHandler ( "addpedfile", createFileHandler ) function pedfunc ( player, cmd, id ) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "lvl 5" ) ) then if ( id == "" ) then outputChatBox ( "Ped-System: Error, the command is /addped ", player, 255, 0, 0 ) return end local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) local int = getElementInterior ( player ) local dim = getElementDimension ( player ) local file = xmlLoadFile ( "peds/peds.xml" ) if ( file ) then local newChild = xmlFindChild ( file, "peds", 0 ) xmlNodeSetAttribute ( newChild, "id", id ) xmlNodeSetAttribute ( newChild, "x", x ) xmlNodeSetAttribute ( newChild, "x", x ) xmlNodeSetAttribute ( newChild, "y", y ) xmlNodeSetAttribute ( newChild, "z", z ) xmlNodeSetAttribute ( newChild, "rotation", rot ) xmlNodeSetAttribute ( newChild, "int", int ) xmlNodeSetAttribute ( newChild, "dim", dim ) xmlSaveFile ( file ) created = createPed ( id, x+1, y, z, rot, int, dim ) setElementInterior ( created, int ) setElementDimension ( created, dim ) setPedRotation ( created, rot ) setElementFrozen ( created, true ) outputChatBox ( "Ped-System: You have successfully made a ped with an ID of #ff0000".. id .."#00ff00!", player, 0, 255, 0, true ) else outputChatBox ( "Ped-System: Failed to load XML file!", player, 255, 0, 0 ) end else outputChatBox ( "Ped-System: This command is only for admins!", player, 255, 0, 0 ) end end addCommandHandler ( "addped", pedfunc ) xmlSaveFile was missing.
  15. You obviously messed up the mysql.lua file, post it here.
  16. Castillo

    help

    That's wrong, these events doesn't has any player argument for who died, only 'source' which is the player that died. @S.K: This should save weapons: playerWeapons = { } addEventHandler ( 'onPlayerWasted', root, function ( ) skin = getElementModel ( source ) setElementData( source, 'skin-save', skin ) playerWeapons [ source ] = getPlayerWeapons ( source ) end ) addEventHandler ( 'onPlayerSpawn', root, function ( ) setElementModel ( source, getElementData ( source, 'skin-save' ) ) if ( playerWeapons [ source ] ) then for weapon, ammo in pairs ( playerWeapons [ source ] ) do giveWeapon ( source, weapon, ammo ) end playerWeapons [ source ] = nil end end ) function getPlayerWeapons ( player ) local weaponsTable = { } for slot = 1, 12 do local weapon = getPedWeapon ( player, slot ) local ammo = getPedTotalAmmo ( player, slot ) if ( weapon > 0 and ammo > 0 ) then weaponsTable [ weapon ] = ammo end end return weaponsTable end
  17. Here you go: http://www.mediafire.com/?4ibdj8y32pex1qn
  18. Go to the resource: "sql/mysql.lua".
  19. Or he can simple use this resource: https://community.multitheftauto.com/ind ... tails&id=4
  20. Simplemente creas una tabla y al morir obtenes los datos del jugador y los guardas dentro con su userdata como index.
  21. El unico problema sera con las no-ciudades.
  22. 2: Podes crear una tabla temporal y al morir poner los datos ( armas, skin, etc ), y al spawnear se los das. 3: Podes guardar una data especial y al loguearte, verificas si la tiene, y si no, le das el skin 123, y lo spawneas en el aeropuerto.
×
×
  • Create New...