Jump to content

Error: Save team


mr.Extreme

Recommended Posts

hello

i have problem with mode save team

when player join team i want kick player From team but i see player backing in the team

i want don't player back in team

how i can Fix this scrip the BUGS :redhotevil:

  
function setTeam() 
    local account = getPlayerAccount(source) -- gets players account 
    local team = getAccountData (account, "team") -- gets players team 
    if (team) and getTeamFromName(team) then 
          setPlayerTeam(source, getTeamFromName(team)) -- sets players team 
    end 
end 
addEventHandler("onPlayerLogin", getRootElement(), setTeam ) -- sets players team on login 
  
function save() 
 local team = getPlayerTeam(source) -- Gets the players team 
local account = getPlayerAccount(source) 
if (team) and not isGuestAccount(account) then -- Checks to see if the player is a guest or not 
setAccountData(account, "team", getTeamName(team)) --saves team 
 end 
    end 
addEventHandler("onPlayerQuit", getRootElement(), save) -- saves team on quit 
  

please answer my question

Link to comment
hello

i have problem with mode save team

when player join team i want kick player From team but i see player backing in the team

i want don't player back in team

how i can Fix this scrip the BUGS :redhotevil:

  
function setTeam() 
    local account = getPlayerAccount(source) -- gets players account 
    local team = getAccountData (account, "team") -- gets players team 
    if (team) and getTeamFromName(team) then 
          setPlayerTeam(source, getTeamFromName(team)) -- sets players team 
    end 
end 
addEventHandler("onPlayerLogin", getRootElement(), setTeam ) -- sets players team on login 
  
function save() 
 local team = getPlayerTeam(source) -- Gets the players team 
local account = getPlayerAccount(source) 
if (team) and not isGuestAccount(account) then -- Checks to see if the player is a guest or not 
setAccountData(account, "team", getTeamName(team)) --saves team 
 end 
    end 
addEventHandler("onPlayerQuit", getRootElement(), save) -- saves team on quit 
  

please answer my question

explain better your English is bad

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