Jump to content

[Duda]Como hacer Para No perder las armas al morir


ConnorKenway17

Recommended Posts

Prueba así

  
function Muerte() 
    local arma1 = getPedWeapon (source, 0) 
    local arma2 = getPedWeapon (source, 1) 
    local arma3 = getPedWeapon (source, 2) 
    local arma4 = getPedWeapon (source, 3) 
    local arma5 = getPedWeapon (source, 4) 
    local arma6 = getPedWeapon (source, 5) 
    local arma7 = getPedWeapon (source, 6) 
    local arma8 = getPedWeapon (source, 7) 
    local arma9 = getPedWeapon (source,8)  
    local arma10 = getPedWeapon (source, 9) 
    local arma11 = getPedWeapon (source, 10) 
    local arma12 = getPedWeapon (source, 11) 
  
    local balas1 = getPedTotalAmmo (source, 0) 
    local balas2 = getPedTotalAmmo (source, 1) 
    local balas3 = getPedTotalAmmo (source, 2) 
    local balas4 = getPedTotalAmmo (source, 3) 
    local balas5 = getPedTotalAmmo (source, 4) 
    local balas6 = getPedTotalAmmo (source, 5) 
    local balas7 = getPedTotalAmmo (source, 6) 
    local balas8 = getPedTotalAmmo (source, 7) 
    local balas9 = getPedTotalAmmo (source,8) 
    local balas10 = getPedTotalAmmo (source, 9) 
    local balas11 = getPedTotalAmmo (source, 10) 
    local balas12 = getPedTotalAmmo (source, 11) 
  
    setTimer (giveWeapon, 2000, 1, source, arma1, balas1, true) 
    setTimer (giveWeapon, 2000, 1, source, arma2, balas2, true) 
    setTimer (giveWeapon, 2000, 1, source, arma3, balas3, true) 
    setTimer (giveWeapon, 2000, 1, source, arma4, balas4, true) 
    setTimer (giveWeapon, 2000, 1, source, arma5, balas5, true) 
    setTimer (giveWeapon, 2000, 1, source, arma6, balas6, true) 
    setTimer (giveWeapon, 2000, 1, source, arma7, balas7, true) 
    setTimer (giveWeapon, 2000, 1, source, arma8, balas8, true) 
    setTimer (giveWeapon, 2000, 1, source, arma9, balas9, true) 
    setTimer (giveWeapon, 2000, 1, source, arma10, balas10, true) 
    setTimer (giveWeapon, 2000, 1, source, arma11, balas11, true) 
    setTimer (giveWeapon, 2000, 1, source, arma12, balas12, true) 
end 
addEventHandler ("onPlayerWasted", getRootElement(), Muerte) 
  
  
  
  
  
  

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...