Jump to content

Question


stefutz101

Recommended Posts

Hi i have a question . This script works fine when i'm in team "Admin" when i leave the team in debugscript 3 appear warnings , a lot o warnings . It spam with warnings . I have warning at "local teamName = getTeamName(playerTeam)" . Help please . Thanks in advance! :)

  
local localPlayer = getLocalPlayer() 
local function canFly() 
    local playerTeam = getPlayerTeam(localPlayer) 
    local teamName = getTeamName(playerTeam) 
    if teamName == "Admin"  then  
        return getTeamName(getPlayerTeam(localPlayer)) == "Admin" 
    else return end 
         
end 

Link to comment
local localPlayer = getLocalPlayer() 
local function canFly() 
    local playerTeam = getPlayerTeam(localPlayer) 
    if playerTeam then 
    local teamName = getTeamName(playerTeam) 
    if teamName == "Admin"  then 
        return getTeamName(getPlayerTeam(localPlayer)) == "Admin" 
    else return end 
     end  
end 

This should work ?

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