Sign in to follow this  

Serverside player vehicle check (not entering)

Recommended Posts

Posted (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 &&

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 by Kubko

Share this post

Link to post
Share on other sites

Check if is null or undefined. Other way around it would be to use if ( +2) as javascript returns false if you check an int and it is 0

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.