Canneil Posted November 14, 2015 Share Posted November 14, 2015 (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 November 14, 2015 by Guest Link to comment
1LoL1 Posted November 14, 2015 Share Posted November 14, 2015 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
Canneil Posted November 14, 2015 Author Share Posted November 14, 2015 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) Link to comment
Canneil Posted November 14, 2015 Author Share Posted November 14, 2015 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 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now