Jump to content

No se guardan las stats, Ayuda


di3g0

Recommended Posts

Queria que se me guardaran las stats de las armas cuando las pongo a 1000 pero no me funciona

acá esta el codigo:

function onPlayerQuit ( )
    local playeraccount = getPlayerAccount ( source )
         setAccountData (playeraccount, "s.stat21", getPedStat ( source, 21))
         setAccountData (playeraccount, "s.stat23", getPedStat ( source, 23))
         setAccountData (playeraccount, "s.stat24", getPedStat ( source, 24))
         setAccountData (playeraccount, "s.stat69", getPedStat ( source, 69))
         setAccountData (playeraccount, "s.stat70", getPedStat ( source, 70))
         setAccountData (playeraccount, "s.stat71", getPedStat ( source, 71))
         setAccountData (playeraccount, "s.stat72", getPedStat ( source, 72))
         setAccountData (playeraccount, "s.stat73", getPedStat ( source, 73))
         setAccountData (playeraccount, "s.stat74", getPedStat ( source, 74))
         setAccountData (playeraccount, "s.stat75", getPedStat ( source, 75))
         setAccountData (playeraccount, "s.stat76", getPedStat ( source, 76))
         setAccountData (playeraccount, "s.stat77", getPedStat ( source, 77))
         setAccountData (playeraccount, "s.stat78", getPedStat ( source, 78))
         setAccountData (playeraccount, "s.stat79", getPedStat ( source, 79))
         setAccountData (playeraccount, "s.stat80", getPedStat ( source, 80))
         setAccountData (playeraccount, "s.stat81", getPedStat ( source, 81))
end
addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit )
 
local root = getRootElement()
 
function onPlayerLogin ( )
    local playeraccount = getPlayerAccount ( source )
     local stat21 = getAccountData(playeraccount, "s.stat21")
     local stat23 = getAccountData(playeraccount, "s.stat23")
     local stat24 = getAccountData(playeraccount, "s.stat24")
     local stat69 = getAccountData(playeraccount, "s.stat69")
     local stat70 = getAccountData(playeraccount, "s.stat70")
     local stat71 = getAccountData(playeraccount, "s.stat71")
     local stat72 = getAccountData(playeraccount, "s.stat72")
     local stat73 = getAccountData(playeraccount, "s.stat73")
     local stat74 = getAccountData(playeraccount, "s.stat74")
     local stat75 = getAccountData(playeraccount, "s.stat75")
     local stat76 = getAccountData(playeraccount, "s.stat76")
     local stat77 = getAccountData(playeraccount, "s.stat77")
     local stat78 = getAccountData(playeraccount, "s.stat78")
     local stat79 = getAccountData(playeraccount, "s.stat79")
     local stat80 = getAccountData(playeraccount, "s.stat80")
     local stat81 = getAccountData(playeraccount, "s.stat81")
     setPedStat ( source, stat21, 1 )
     setPedStat ( source, stat23, 1 )
     setPedStat ( source, stat24, 1 )
     setPedStat ( source, stat69, 1 )
     setPedStat ( source, stat70, 1 )
     setPedStat ( source, stat71, 1 )
     setPedStat ( source, stat72, 1 )
     setPedStat ( source, stat73, 1 )
     setPedStat ( source, stat74, 1 )
     setPedStat ( source, stat75, 1 )
     setPedStat ( source, stat76, 1 )
     setPedStat ( source, stat77, 1 )
     setPedStat ( source, stat78, 1 )
     setPedStat ( source, stat79, 1 )
     setPedStat ( source, stat80, 1 )
     setPedStat ( source, stat81, 1 )
     outputChatBox ( "☠ se han guardado tus estadísticas ☠ ", source, 47, 79, 79 )
end
addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )

perdonen que me quedó todo separado al pegarlo aqui no se porque ._.

Edited by elmoxxx666
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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