Jump to content

get vehile occupant seat


botshara

Recommended Posts

  
function antinj () 
 local occupied = getVehicleOccupant( source ) 
    if (occupied == 0) then 
         cancelEvent() 
        outputChatBox("Tā nav labi darīt!", player) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 
  

If the seat 0 is occupied then cant jack other player your from the car. Please help fix

Link to comment
function antinj ( p ) 
    local occupied = getVehicelController ( source ) 
    if ( isElement ( occupied ) ) then 
        cancelEvent() 
        outputChatBox("Tā nav labi darīt!", p ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 
  

Link to comment
function antinj ( p ) 
    local occupied = getVehicelController ( source ) 
    if ( isElement ( occupied ) ) then 
        cancelEvent() 
        outputChatBox("Tā nav labi darīt!", p ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 
  

nop, dont works

Link to comment
function antinj ( p, _, jacked ) 
    local occupied = getVehicleOccupant ( source ) 
    if ( occupied == jacked ) then 
        cancelEvent() 
        outputChatBox("Tā nav labi darīt!", p ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 

Try this.

Link to comment
function antinj ( p, _, jacked ) 
    local occupied = getVehicleOccupant ( source ) 
    if ( occupied == jacked ) then 
        cancelEvent() 
        outputChatBox("Tā nav labi darīt!", p ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 

Try this.

Thanks man :)

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