Jump to content

Error un poco raro


Arsilex

Recommended Posts

Posted
function Login() 
      local playerAccount = getPlayerAccount(source) 
      if playerAccount then 
            local playerMoney = getAccountData(playerAccount, "Cash") 
            local playerEXP = getAccountData(playerAccount, "Exp") 
            if playerMoney and playerEXP then 
                  setElementData(source, "Cash", playerMoney or 0) 
                  setElementData(source, "Exp", playerEXP or 0) 
            end 
      end 
end 
addEventHandler("onPlayerLogin", getRootElement(), Login) 

me da error getPlayerAccount(source) en el argumento (que supuestamente esta definido por onPlayerLogin)

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

Que error exactamente?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Capaz que estas ejecutando el evento "onPlayerLogin" con algun script?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Aca no da ningun error.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Busca por: triggerEvent

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
function Login(_, c) 
            local playerMoney = getAccountData(c, "Cash") 
            local playerEXP = getAccountData(c, "Exp") 
            if playerMoney and playerEXP then 
                  setElementData(source, "Cash", playerMoney or 0) 
                  setElementData(source, "Exp", playerEXP or 0) 
            end 
end 
addEventHandler("onPlayerLogin", getRootElement(), Login) 

  • Recently Browsing   0 members

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