Jump to content

save skills


Recommended Posts

Posted

Does not save!

Debug: no errors. Help pls o.O

function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin)
  if  not (isGuestAccount (getPlayerAccount (source))) then
      local wpn1 = getAccountData (theCurrentAccount, "ak47")
      setPedStat (source, wpn1, 77)  
  end
end
addEventHandler ("onPlayerLogin", getRootElement(), playerLogin)

function onQuit (quitType, reason, responsibleElement)
  if not (isGuestAccount (getPlayerAccount (source))) then
    account = getPlayerAccount (source)
    if (account) then
      setAccountData (account, "ak47", getPedStat (source, 77))
    end
  end
end
addEventHandler ("onPlayerQuit", getRootElement(), onQuit)

 

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...