Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    MYSQL

    We don't give support with leaked scripts. Topic locked.
  2. Are you sure that you changed the one at: "\server\mods\deathmatch\resources\[gameplay]\freeroam\"?
  3. Which is exactly what I said, I didn't specifiy how he had to attach it.
  4. Set the freeroam resource: "spawnmaponstart" setting to false and restart the resource.
  5. Oh, that's the problem, you're editing the wrong file, you have to edit the one at: "server\mods\deathmatch\resources\[gameplay]\freeroam\"
  6. That doesn't make any sense, you put it as .ZIP or folder?
  7. You restarted the resource?
  8. Beer? all you can do is attach an object and use an animation.
  9. exports.scoreboard:scoreboardAddColumn("ExP") exports.scoreboard:scoreboardAddColumn("Level") local levels = {[1] = 1, [50] = 2, [75] = 3, [240] = 4, [950] = 5, [1200] = 6, [2000] = 7, [5000] = 8, [9963] = 9, [20000] = 10, [100000] = 11} function win(ammo, killer, weapon, bodypart) if (killer and killer ~= source) then local H = getElementData(killer, "ExP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) setElementData(killer, "ExP", tonumber(H)+math.random ( 5, 35 ) ) if levels[tonumber(H)] then setElementData(killer, "Level", "Lvl ".. tostring(levels[tonumber(H)]) .." !") triggerClientEvent ( killer, "playSound", killer ) end end local H = getElementData ( source, "ExP" ) or 0 setElementData ( source, "ExP", tonumber ( H ) - math.random ( 5, 35 ) ) end addEventHandler( "onPlayerWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "lvl") or "Level 0 ") setElementData(source, "ExP", getAccountData(account, "exp") or "0") end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "lvl", getElementData(thePlayer, "Level")) setAccountData (theAccount, "exp", getElementData(thePlayer, "ExP")) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function (prev) saveData(source, prev) end)
  10. For dimension: setElementDimension And to make it never die, you must cancel the event onClientPedDamage with cancelEvent. To make it execute a function when near, you can use colshapes. createColTube
  11. The script you've posted works? and you want to add random experience?
  12. What do you mean by "resets itself"?
  13. Castillo

    Question

    There's also the "onElementDestroy" event for when an element is destroyed by destroyElement. https://wiki.multitheftauto.com/wiki/OnElementDestroy
  14. Why is not working? I don't see math.random anywhere on your script either.
  15. Igual, podrias crear tu propia funcion.
  16. Creo que el script no tiene para que solo se envie a un jugador.
  17. La funcion: "outputDraw" del recurso "drawData" que argumentos tiene?
  18. exports [ "scoreboard" ]:scoreboardAddColumn ( "Money" ) exports [ "scoreboard" ]:scoreboardAddColumn ( "Zombie kills" ) My "exp_system" uses "level" and "exp" element data.
  19. You can create your own function, you don't have to use the native one.
  20. Then it should work.
  21. Is your scoreboard resource named: "scoreboard"?
×
×
  • Create New...