Jump to content

I need help with anti-jacked script !!!!


Canneil

Recommended Posts

Hello, need some help with this script

function antinj ( p, _, jacked ) 
    local occupied = getVehicleOccupant ( source ) 
    if ( occupied == jacked ) then 
        cancelEvent() 
        outputChatBox("You can't ninja jacking other people car!", p ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 

If anyone not in car, i enter car seat( 2 ) outboxchat says: you cant ninja jacking, but anyone not in car!

i need if someone is in car seat (0) then only outboxchat say

Edited by Guest
Link to comment
Hello, need some help with this script

function antinj ( p, _, jacked ) 
    local occupied = getVehicleOccupant ( source ) 
    if ( occupied == jacked ) then 
        cancelEvent() 
        outputChatBox("You can't ninja jacking other people car!", p ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 

If anyone not in car, i enter car seat( 2 ) outboxchat says: you cant ninja jacking, but anyone not in car!

i need if someone is in car seat (0) then only outboxchat say

I don't understand but try this:

function antinj ( p, _, jacked ) 
    local occupied = getVehicleOccupant ( source ) 
    if ( occupied ) then 
        cancelEvent() 
        outputChatBox("You can't ninja jacking other people car!", p ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 

Link to comment

So, if someone was in the car, you can not throw out of their cars, but you can sit next to the occupant's place

Example:

function antinj ( p, _, jacked ) 
            local vehicleSeat = getPedOccupiedVehicleSeat(source) 
            if (vehicleSeat == 0) 
        if ( vehicleSeat == jacked ) then            
        cancelEvent() 
        outputChatBox("You can't ninja jacking other people car!", p ) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), antinj ) 

but this not working :D

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