Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Where's teamVehicles table?
  2. -- client side: addEventHandler ( "onClientPedDamage", getRootElement(), function (attacker) if not attacker then return end if ( getElementType(source) == "ped" and getElementType(attacker) == "vehicle" ) then triggerServerEvent("killZombie",localPlayer,source) end end) -- server side: addEvent("killZombie",true) addEventHandler ( "killZombie", getRootElement (), function ( zombie ) if zombie and source then killPed ( zombie, source ) end end)
  3. function playerQuit() local playerAcc = getPlayerAccount(source) if ( playerAcc ) then -- You we're checking if (playeraccount == true) then, but your variable name is "playeracc". local playerCash = getPlayerMoney(source) setAccountData(playerAcc, "cash", playerCash) setPlayerMoney(source, 0) end end addEventHandler("onPlayerQuit", getRootElement(), playerQuit) addEventHandler("onPlayerLogout", getRootElement(), playerQuit) function playerLogin() local playerAcc = getPlayerAccount(source) if (playerAcc) then local playerBank = getAccountData(playerAcc, "cash") if (playerBank) then setPlayerMoney(source, tonumber(playerBank)) else outputChatBox("You are broke.", source, 255, 0, 0) end end end addEventHandler("onPlayerLogin", getRootElement(), playerLogin)
  4. Tank, If I would be you, I would post a screenshot of what the bug you showed me .
  5. Aca tenes uno que cree, deberia funcionar: -- client.lua: local skins = {{"skin1", 46}, {"skin54", 53}} function load() for index, skin in pairs(skins) do txd = engineLoadTXD ( skin[1].. ".txd" ) engineImportTXD ( txd, skin[2] ) dff = engineLoadDFF ( skin[1].. ".dff", 0 ) engineReplaceModel ( dff, skin[2] ) end end addEventHandler("onClientResourceStart",resourceRoot, function () local version = getVersion() if string.find(version.mta, "1.1.1") then setTimer ( load, 1000, 1) end end) -- meta.xml: Supongo que sabes crear un recurso, verdad?
  6. I wasn't trying to give him the full script, karlis, I'm trying to give him a code where to start of.
  7. local weaponsThatCantFireBullets = {[0] = true, [1] = true, [2] = true, [3] = true, [4] = true, [5] = true, [6] = true, [7] = true, [8] = true, [9] = true, [10] = true, [11] = true, [12] = true, [13] = true, [14] = true, [15] = true, [16] = true, [40] = true, [44] = true, [45] = true, [46] = true} local lines = {} function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if weaponsThatCantFireBullets[weapon] then return end local mx, my, mz = getPedWeaponMuzzlePosition(source) lines[#lines +1] = {mx, my, mz, hitX, hitY, hitZ} end addEventHandler("onClientPlayerWeaponFire", root, onClientPlayerWeaponFireFunc) addEventHandler("onClientRender",root, function () for index, line in pairs(lines) do dxDrawLine3D(line[1],line[2],line[3],line[4],line[5],line[6],tocolor(255,0,0,255)) end end) Should be enough for a start.
  8. The maximun health a player/ped can have is 200%.
  9. Para remplazar skins necesitas saber algo de la programacion de LUA. Usa las funciones de "Engine" para conseguir esto. https://wiki.multitheftauto.com/wiki/Cli ... _functions
  10. Could you put your code in LUA tags? Also, what error do you get?
  11. De que skin hablas? de la interface grafica?
  12. Your script is a total mess, you are using like 3 or more different variables for the player element, that'll never work. I suggest you to take a while to read your script and try to find out your error(s).
  13. Qwert, what he want's is add borders to the DX text.
  14. Well, I just told you to search for google api. P.S: Let's stop doing off-topic .
  15. I wasn't talking about the GUI design, I was talking about the idea itself. P.S: I didn't gave you any link, that was sarcasm I guess .
  16. You can use triggerServerEvent from client side and add it on server side to give the weapon.
  17. Well, then I think the forum has to be updated, as the function color is YELLOW, it should be BLUE if was client & server function.
  18. Well, seems like my "Google translator" idea got already copied, but that doesn't make the idea legitim .
  19. Castillo

    dxDrawing

    CaPy, when you asked me for help via PM, I sent you the script with the event handler of "onClientRender", you took it off?
  20. Castillo

    Problems

    That's because it's nil. onClientColShapeHit doesn't return the radar area, because that's not possible, a col shape and a radar area are two different things.
  21. Ignition, giveWeapon are server only functions.
  22. Castillo

    Preguntas

    Mira este recurso: https://community.multitheftauto.com/index.php?p= ... ils&id=298 usa esas funciones, asi tipo /fly /water /bunny y eso.
  23. Castillo

    Preguntas

    Pues, entonces lo hiciste mal (no es mala onda, es la verdad...), tenes alguna experiencia en programacion de LUA?
×
×
  • Create New...