Noox Posted June 23, 2014 Share Posted June 23, 2014 (edited) I want to give player some moneys when he is in a vehicle the game spawned when a key was pressed but I noticed that isInVehicle() doesn't take any arguments so I thought I might ask here, I have a Vehicle type variable named randomVehicle, how can I see if the player is inside randomVehicle? EDIT: I found now currentVehicle, since I cannot try right now is the syntax if(Player.Character.CurrentVehicle == randomVehicle) ? Edited June 23, 2014 by Noox Link to comment Share on other sites More sharing options...
Jitnaught Posted June 23, 2014 Share Posted June 23, 2014 (edited) isInVehicle does take an argument for the vehicle. You can also check if the current vehicle equals the other vehicle (which you already wrote). Or you can use isSittingInvehicle (which, just to make sure you know, does take an argument for the vehicle). Edited June 23, 2014 by LetsPlayOrDy Link to comment Share on other sites More sharing options...
Noox Posted June 23, 2014 Author Share Posted June 23, 2014 My Visual Studio was saying otherwise Link to comment Share on other sites More sharing options...
Jitnaught Posted June 23, 2014 Share Posted June 23, 2014 My Visual Studio was saying otherwise What version are you using? I've had that problem before I believe, and I just updated to 2013. Link to comment Share on other sites More sharing options...
Noox Posted June 23, 2014 Author Share Posted June 23, 2014 My Visual Studio was saying otherwise What version are you using? I've had that problem before I believe, and I just updated to 2013. 2013 just like you Link to comment Share on other sites More sharing options...
Jitnaught Posted June 23, 2014 Share Posted June 23, 2014 My Visual Studio was saying otherwise What version are you using? I've had that problem before I believe, and I just updated to 2013. 2013 just like you Well then I have no idea! (Maybe restart VS, if you already haven't done that.) Link to comment Share on other sites More sharing options...
Maro Hannover Posted June 23, 2014 Share Posted June 23, 2014 I use MSVS 2010 Ultimate. What is difference between 2010 and 2013 I 've found a way USE THIS if(Player.Character.LastVehicle == randomVehicle){//what you want to happen} Link to comment Share on other sites More sharing options...
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