Jump to content

Why this doesn't work? [SOLVED]


KiffShark

Recommended Posts

I have done this script but it doesn't work... I've tried in many ways before than this, but anything happens in anyway :(

(client)

function visionn() 
    local vTeam=getPlayerTeam(playerLocalPlayer()) 
    if getTeamName(vTeam)=="FA" then 
  
    if(getCameraGoggleEffect == "normal") then 
            setCameraGoggleEffect("nightvision") 
            outputChatBox ( "*nocturna activadas*", 255, 0, 0, true)  
        elseif(getCameraGoggleEffect == "nightvision") then 
            outputChatBox ( "*nocturna desactivadas*", 255, 0, 0, true) 
            setCameraGoggleEffect("normal") 
        end 
    else 
    end 
end 
addCommandHandler("gafasvn", visionn) 
bindKey ("b", "down", "gafasvn") 
  
  
function visiont() 
    local vtTeam=getPlayerTeam(playerLocalPlayer()) 
    if getTeamName(vtTeam)=="PSG" then 
  
    if(getCameraGoggleEffect == "normal") then 
            outputChatBox ( "*térmica activadas*", 255, 0, 0, true) 
            setCameraGoggleEffect("thermalvision") 
        elseif(getCameraGoggleEffect == "thermalvision") then 
            outputChatBox ( "*térmica desactivadas*", 255, 0, 0, true) 
            setCameraGoggleEffect("normal") 
        end 
    else 
    end 
end 
addCommandHandler("gafasvt", visiont) 
bindKey ("b", "down", "gafasvt") 

Somebody can help me please?

thanks!!

Edited by Guest
Link to comment
playerLocalPlayer 

Is not a valid function name.

function visionn ( ) 
    local vTeam = getPlayerTeam ( localPlayer ) 
    if ( vTeam and getTeamName ( vTeam ) == "FA" ) then 
        local newVision = ( getCameraGoggleEffect ( ) == "nightvision" and "normal" or "nightvision" ) 
        setCameraGoggleEffect ( newVision ) 
        outputChatBox ( "*nocturna ".. ( newVision == "nighvision" and "activadas" or "desactivadas" ) .."*", 255, 0, 0, true ) 
    end 
end 
addCommandHandler ( "gafasvn", visionn ) 
bindKey ( "b", "down", "gafasvn" ) 
  
function visiont() 
    local vtTeam = getPlayerTeam ( localPlayer ) 
    if ( vtTeam and getTeamName ( vtTeam ) == "PSG" ) then 
        local newVision = ( getCameraGoggleEffect ( ) == "thermalvision" and "normal" or "thermalvision" ) 
        setCameraGoggleEffect ( newVision ) 
        outputChatBox ( "*térmica ".. ( newVision == "thermalvision" and "activadas" or "desactivadas" ) .."*", 255, 0, 0, true ) 
    end 
end 
addCommandHandler ( "gafasvt", visiont ) 
bindKey ( "b", "down", "gafasvt" ) 

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