Jump to content

Vidro do veiculo


Recommended Posts

Olá, testei os 2 exemplos do WIKI e está dando erro, certeza que é client side ?

isVehicleWindowOpen

table = { 4, 2, 5, 3 } 
  
addCommandHandler ("vidro", function (  ) 
  if ( isPedInVehicle ( localPlayer ) ) then 
 local vehicle = getPedOccupiedVehicle( localPlayer )  
 local window = getPedOccupiedVehicleSeat( localPlayer ) 
 setVehicleWindowOpen( vehicle, table[window], not isVehicleWindowOpen( vehicle, table[window] ) ) 
          end 
    end 
 ) 

setVehicleWindowOpen

local seatWindows = { 
    [0] = 4, 
    [1] = 2, 
    [2] = 5, 
    [3] = 3 
} 
  
addCommandHandler("vidro", 
    function() 
        local veh = getPedOccupiedVehicle( localPlayer ) 
        if veh then 
            local seat = getPedOccupiedVehicleSeat( localPlayer ) 
            if seatWindows[seat] and setVehicleWindowOpen( veh, seatWindows[seat], not isVehicleWindowOpen( veh, seatWindows[seat] ) ) then 
                outputChatBox( "Janelas abertas" ) 
            else 
                outputChatBox( "Você não tem janela!" ) 
            end 
        else 
            outputChatBox( "Você deve estar no veículo!" ) 
        end 
    end 
) 

mOtXgZJ.png

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