Arsilex Posted January 4, 2013 Posted January 4, 2013 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)
Castillo Posted January 4, 2013 Posted January 4, 2013 Que error exactamente? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted January 4, 2013 Posted January 4, 2013 Capaz que estas ejecutando el evento "onPlayerLogin" con algun script? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Arsilex Posted January 4, 2013 Author Posted January 4, 2013 con otro script? y si es asi entonces no ningun otro script ejecuta onPlayerLogin que yo sepa
Castillo Posted January 4, 2013 Posted January 4, 2013 Aca no da ningun error. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted January 4, 2013 Posted January 4, 2013 Busca por: triggerEvent San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Renkon Posted January 4, 2013 Posted January 4, 2013 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)
Recommended Posts