Kubko Posted March 29, 2019 Posted March 29, 2019 (edited) Hey, today I have been trying to add check whether player already sits in the vehicle (not entering). The closest one method that was close to fit my needs was this: if(player.vehicle && player.seat) This worked for all the seats, but for obvious reason seat 0 was determinated as player woudln't be sitting in the vehicle. So what's the way to make all seats work correctly? Thank you very much! Edited March 29, 2019 by Kubko
robearded Posted March 30, 2019 Posted March 30, 2019 Check if player.seat is null or undefined. Other way around it would be to use if (player.seat +2) as javascript returns false if you check an int and it is 0
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