botshara

get vehile occupant seat

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

Share this post


Link to post
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 ) 
  

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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 :)

Share this post


Link to post

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.