Jump to content

Help jack car


Recommended Posts

What did is wrong here?

teams = { 'LEI', 'team2' } 
cars = { 598, 596, 597, 599, 497, 490, 528, 599, 523, 425 } 
  
function checkTeam( player ) 
    for k,v in ipairs( teams ) do 
        if getTeamName( getPlayerTeam( player ) ) == v then 
            return true 
        end 
    end 
    return false 
end 
  
addEventHandler( 'onVehicleStartEnter', root, function( player ) 
    for k,v in ipairs( cars ) do 
        if getElementModel( source ) == v then 
            local check = checkTeam( player ) 
            if not check then 
                cancelEvent( ) 
                outputChatBox( '#F08080[ERRO] #FF0000Este veículo pertence a Organização LEI !', player, 255, 255, 255, true ) 
            end 
        end 
    end 
end ) 
  
teams = { 'Crips', 'team2' } 
cars = { 520 } 
  
function checkTeamCrips( player ) 
    for k,v in ipairs( teams ) do 
        if getTeamName( getPlayerTeam( player ) ) == v then 
            return true 
        end 
    end 
    return false 
end 
  
addEventHandler( 'onVehicleStartEnter', root, function( player ) 
    for k,v in ipairs( cars ) do 
        if getElementModel( source ) == v then 
            local check = checkTeamCrips( player ) 
            if not check then 
                cancelEvent( ) 
                outputChatBox( '#F08080[ERRO] #FF0000Este veículo pertence a Gangue Crips !', player, 255, 255, 255, true ) 
            end 
        end 
    end 
end ) 
  
teams = { 'Bloods', 'team2' } 
cars = { 450 } 
  
function checkTeamBloods( player ) 
    for k,v in ipairs( teams ) do 
        if getTeamName( getPlayerTeam( player ) ) == v then 
            return true 
        end 
    end 
    return false 
end 
  
addEventHandler( 'onVehicleStartEnter', root, function( player ) 
    for k,v in ipairs( cars ) do 
        if getElementModel( source ) == v then 
            local check = checkTeamCrips( player ) 
            if not check then 
                cancelEvent( ) 
                outputChatBox( '#F08080[ERRO] #FF0000Este veículo pertence a Gangue Bloods !', player, 255, 255, 255, true ) 
            end 
        end 
    end 
end ) 
  
  
  

Link to comment
You aren't make a much sense with you're script what about trying to explain what are you trying to do ?

only who is the gang can get in a vehicle, then I put 3 times the same script and modified the names of gangs and changed vehicles, more is not working, sorry for my englis

Link to comment
You aren't make a much sense with you're script what about trying to explain what are you trying to do ?

only who is the gang can get in a vehicle, then I put 3 times the same script and modified the names of gangs and changed vehicles, more is not working, sorry for my englis

Debes poner esto en el topico de espanol/portugues. Aqui o Aqui.

You should put this in the Spanish/Portuguese topic since that's what you understand.

Link to comment
sorry I do not speak Spanish, I speak Portuguese (BRAZIL), and the Portuguese area nobody goes there, and I know of no good scripter who is Brazilian unless the Zolo (;

Ahh my bad. Anyways, does the debug say anything about the script? Is there a certain area in the script that you need help on or think is wrong?

Link to comment
You aren't make a much sense with you're script what about trying to explain what are you trying to do ?

only who is the gang can get in a vehicle, then I put 3 times the same script and modified the names of gangs and changed vehicles, more is not working, sorry for my englis

Debes poner esto en el topico de espanol/portugues. Aqui o Aqui.

You should put this in the Spanish/Portuguese topic since that's what you understand.

So ok;)

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