maihym 12 Posted December 17, 2015 How can I check if a player is in a vehicle? I basically want it to say this If (player is in a vehicle) then (do this). Share this post Link to post Share on other sites
nikiller 18 Posted December 17, 2015 hi, if !(player == vehicle player) then {do something}; But for better performance you should use objectParent: if !(isNull objectParent player) then {do something}; cya. Nikiller. 1 Share this post Link to post Share on other sites
maihym 12 Posted December 17, 2015 hi, if !(player == vehicle player) then {do something}; But for better performance you should use objectParent: if !(isNull objectParent player) then {do something}; cya. Nikiller. So that's saying that the player is in the vehicle right? Share this post Link to post Share on other sites
seba1976 98 Posted December 17, 2015 So that's saying that the player is in the vehicle right? Correct. Share this post Link to post Share on other sites
seba1976 98 Posted December 17, 2015 But for better performance you should use objectParent: if !(isNull objectParent player) then {do something}; Thanks man, didn't know about the objectParent command. Share this post Link to post Share on other sites
shuko 59 Posted December 17, 2015 Is the mentioned performance difference huge? Share this post Link to post Share on other sites
killzone_kid 1331 Posted December 17, 2015 Is the mentioned performance difference huge? Noticeable 1 Share this post Link to post Share on other sites
maihym 12 Posted December 17, 2015 Ok now how would I put if !(isNull objectParent player) then {do something}; As a variable. So basically its like if(is a player and not in a car) then (do something) Share this post Link to post Share on other sites
nikiller 18 Posted December 17, 2015 use isPlayer command. Share this post Link to post Share on other sites
seba1976 98 Posted December 17, 2015 It might be relevant the allPlayers too. Share this post Link to post Share on other sites