Search the Community
Showing results for tags 'team save'.
-
hi some time ago castillo give a script that saves team why it no work? he said he have no time to test. function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "team") if (accountData) then setPlayerTeam(source,accountData) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement,thePreviousAccount) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local team = getPlayerTeam(source) local teamname = getTeamName(team) setAccountData (account, "team", teamname) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function onLogout(prevAccount) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local team = getPlayerTeam(source) local teamname = getTeamName(team) setAccountData (account, "team", teamname) end end end addEventHandler("onPlayerLogout", getRootElement(), onLogout)
-
hi, I need help I want it when someone registers and logs into your account when logging into your account automatically passes it to a team such as Team * Civil * I want it when I register and log in to the team * Civil * Automatically ..... Please if you would be so kind to help me with a script like this or give me an idea