chinagreenelvis Posted February 24, 2016 Share Posted February 24, 2016 (edited) If you want to do something only while the cell phone is active (or when the cell phone becomes active), you can use the following native: http://www.dev-c.com/nativedb/func/info/1cea6bfdf248e5d9 For instance, CONTROLS::IS_CONTROL_ENABLED(2, 19) and CONTROLS::IS_CONTROL_ENABLED(2, 27) can be used to find out if INPUT_CHARACTER_WHEEL and INPUT_PHONE are enabled. (https://github.com/gamebooster/gta5-lua-engine/blob/master/scripts/inputs.lua) When those inputs are disabled, it means the phone has been activated by either the controller (INPUT_CHARACTER_WHEEL) or keyboard (INPUT_PHONE). Hope that makes sense! Edited February 24, 2016 by chinagreenelvis Link to comment Share on other sites More sharing options...
jedijosh920 Posted February 24, 2016 Share Posted February 24, 2016 Or instead of doing all that bullcrap, just use the CAN_PHONE_BE_SEEN_ON_SCREEN() native! Link to comment Share on other sites More sharing options...
chinagreenelvis Posted February 25, 2016 Author Share Posted February 25, 2016 (edited) Or instead of doing all that bullcrap, just use the CAN_PHONE_BE_SEEN_ON_SCREEN() native! That native does not produce the desired result (at least not when used with a 360 controller, I don't remember testing it with the keyboard and mouse). Edited February 25, 2016 by chinagreenelvis Link to comment Share on other sites More sharing options...
jedijosh920 Posted February 25, 2016 Share Posted February 25, 2016 Well it worked for me, it detects the cellphone like you asked. I don't think it works with Chinese versions, like some natives do if you are Chinese. Link to comment Share on other sites More sharing options...
chinagreenelvis Posted February 25, 2016 Author Share Posted February 25, 2016 I just tested again; it always returns true, even if the cell phone is not activated. Link to comment Share on other sites More sharing options...
Skorpro Posted February 27, 2016 Share Posted February 27, 2016 I just tested again; it always returns true, even if the cell phone is not activated. Use this... if (IS_PED_RUNNING_MOBILE_PHONE_TASK(PLAYER_PED_ID())) ...instead R3QQ and jedijosh920 2 Link to comment Share on other sites More sharing options...
chinagreenelvis Posted March 10, 2016 Author Share Posted March 10, 2016 I just tested again; it always returns true, even if the cell phone is not activated. Use this... if (IS_PED_RUNNING_MOBILE_PHONE_TASK(PLAYER_PED_ID()))...instead Well, that only works in single-player mode. If it ever becomes possible to run scripts in online-mode again, that function always returns true and the method in the original post is necessary. Link to comment Share on other sites More sharing options...
alloc8or Posted March 10, 2016 Share Posted March 10, 2016 I just tested again; it always returns true, even if the cell phone is not activated. Use this... if (IS_PED_RUNNING_MOBILE_PHONE_TASK(PLAYER_PED_ID()))...instead Well, that only works in single-player mode. If it ever becomes possible to run scripts in online-mode again, that function always returns true and the method in the original post is necessary. What do you mean by "If it ever becomes possible to run scripts in online-mode again"? It works since a few weeks after release. 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