Jump to content

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


Canneil

Recommended Posts

Posted (edited)

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
Posted
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 ) 

Posted

dont working, my script is when someone cant enter in not uncopiend seat (1,2,3) but your is when cant enter (seat=0)

i need, if someone driving with car, you can jack car, but you can enter in seat(1,2,3)

Posted

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

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