Bierbuikje Posted April 7, 2009 Share Posted April 7, 2009 Hello, I have a question about the point you can place on the radar. How to let a car driving to the point that the player made on the map? When your playing the game and press 'ESC' you have a menu with options. One of the options is 'MAP' and when you click on it you can put a point somewhere on the map. My question is: 'How to get the coords of this point'? Is there an opcode or something. I really don't know. Thanks. Link to comment Share on other sites More sharing options...
coin-god Posted April 7, 2009 Share Posted April 7, 2009 I beleave theres an opcode for that, i think is this one 0AB6: store_target_marker_coords_to [email protected] [email protected] [email protected] // IF and SET Link to comment Share on other sites More sharing options...
Bierbuikje Posted April 7, 2009 Author Share Posted April 7, 2009 Is there a way to check if the player puts a target on his radar? Link to comment Share on other sites More sharing options...
PatrickW Posted April 7, 2009 Share Posted April 7, 2009 If the player didn't set the target on the map, than this opcode will not change the variables. The trick is to set one of the variables to an invalid value (for coordinates), e.g. you can set the X coordinate to -10.000. Than you execute the opcode and test if the X coordinate is still -10000 afterwards, in that case, no marker was set. If it has another value, the marker was set, and the coordinates returned are valid. BTW. This is an opcode that is added by the CLEO library, so only people with CLEO installed can use your mod. BUt if you want to use it in a CLEO script anyway, that's no problem. Link to comment Share on other sites More sharing options...
james227uk Posted April 7, 2009 Share Posted April 7, 2009 Checking if Target Marker is set is easy. Just add this: 0A8D: [email protected] = read_memory 12223258 size 1 virtual_protect 0 if not [email protected] == 0 else_jump @LABEL Link to comment Share on other sites More sharing options...
PatrickW Posted April 7, 2009 Share Posted April 7, 2009 Using memory addresses like this is a bit tricky as the addresses tend to vary based on the version of the executable that you have. Most of the time you have to use "0AA9: is_game_version_original" to determine the version that is used, and use a different memory address, based on the outcome. 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