Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. There it'll explain you how to make a meta.xml.
  2. https://wiki.multitheftauto.com/wiki/Meta.xml
  3. El segundo argumento de addCommandHandler es el comando que se uso, ademas tenes que usar getPlayerFromName para obtener el elemento del jugador de un nombre.
  4. Ese script no tiene mucho sentido para mi. Como ejecutas la funcion?
  5. It worked, thanks! You're welcome.
  6. If I'm right, the exported function: giveMoney is not available client side.
  7. You could store all players and their money, and then use table.sort and return the first item from the table.
  8. Well, yesterday before start creating this, I tested yours and it just didn't work, no errors or anything, just zombies could be killed like they had normal health. @qais, anderl: This can be used to increase player's health, zombies ( to make bosses ) and whatever you want. @knash: Thanks.
  9. Yeah, I guess so, sorry for the missunderstood.
  10. I doubt it, it's a pretty easy resource.
  11. Go to your database and click "Import", then select the file you exported and it'll create the table with the name of the file.
  12. Go to the desired table and click "Export"?
  13. Export the table with phpMyAdmin, then import it back.
  14. Is your comment sarcastic?
  15. Castillo

    Vida

    Y como sabes que no funciona? ese script no va a updatear la scoreboard tambien, ya que es account data, no element data.
  16. Castillo

    Vida

    Si, esta bien.
  17. Pone un timer para que dispare. Para la vida extra, usa el recurso que acabo de crear y subir: https://community.multitheftauto.com/ind ... ls&id=5195 Para cambiarle el skin usa: setElementModel
  18. Castillo

    Vida

    Las funciones de get/setAccountData se usan con cuentas, no jugadores. function getPlayerReset ( jugador ) if ( jugador ) then local account = getPlayerAccount ( jugador ) if ( account and not isGuestAccount ( account ) ) then return tonumber ( getAccountData ( account, "Reset") ) or 0 else return false end else return false end end function setPlayerReset ( jugador, resets ) if ( jugador ) then local account = getPlayerAccount ( jugador ) if ( account and not isGuestAccount ( account ) ) then return setAccountData ( account, "Reset", resets ) else return false end else return false end end
  19. Castillo

    Vida

    Lo probe y no lo pude matar aun ( ya que tiene 5000 de vida ).
  20. Castillo

    Vida

    Si, lo probe con el de "zombies" y funciono, asi que con los "slothbots" tambien tiene que funcionar .
  21. Castillo

    Vida

    Para darle vida extra a un "ped" o un "player" podes usar el recurso "extra_health" que acabo de crear y subir en remplazo al de Benxamix, ya que no funcionaba. https://community.multitheftauto.com/ind ... ls&id=5195
  22. Hi everyone. Well, as you all may know, there's already a "extra health" resource, but is not working, so after I seen that many people need this, I decided to make my own and upload it. Exported functions are: getElementExtraHealth ( theElement ) setElementExtraHealth ( theElement, theHealth ) isElementWithExtraHealth ( theElement ) setElementInvulnerable ( theElement, theState ) isElementInvulnerable ( theElement ) Download link: Click here! Enjoy it!
  23. outputChatBox client side has no visibleTo argument. -- client side: addEvent ( "reproducir", true ) addEventHandler ( "reproducir", root, function ( ) if getKeyState ( "lctrl" ) then if ( not isElement ( r1 ) ) then r1 = playSound ( "http://ecrd.com/files/2/tgyb1wnqsjfu2w/J%20King%20&%20Maximan%20Ft%20%C3%91engo%20Flow,%20Arcangel,%20De%20La%20Ghetto,%20Randy,%20Alexis,%20Jamsha%20Y%20Chyno%20Nyno%20-%20Siente%20(Official%20Remix)%20(ECRD.Com).mp3" ) if ( r1 ) then outputChatBox ( "La Musica esta empezando por ".. getPlayerName ( source ), 255, 255, 255, true ) else outputChatBox ( "La Musica ya esta sonando", 255, 255, 255, true ) end end end end ) addEvent ( "detener", true ) addEventHandler ( "detener", root, function ( ) if getKeyState ( "lctrl" ) then if isElement ( r1 ) then destroyElement ( r1 ) outputChatBox ( "La Musica esta parando por ".. getPlayerName ( source ), 255, 255, 255, true ) else outputChatBox ( "La Musica no esta sonando !", 255, 255, 255, true ) end end end ) -- server side: addEventHandler ( "onResourceStart", resourceRoot, function ( ) for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do bindKey ( thePlayer, "m", "down", startMusic ) bindKey ( thePlayer, "n", "down", stopMusic ) end end ) function startMusic ( thePlayer ) triggerClientEvent ( "reproducir", root, thePlayer ) end function stopMusic ( thePlayer ) triggerClientEvent ( "detener", root, thePlayer ) end Try that.
×
×
  • Create New...