Gidah43 Posted September 5, 2011 Share Posted September 5, 2011 I'm having trouble finding the right opcodes to use to set the map marker (The real one). This is the current code. {$CLEO .cs}:MARKERTEST03A4: name_thread "TESTLICIOUS"wait 1000:LOLwait 0if0AB0: key_pressed 122004D: jump_if_false @LOL00BA: text_styled 'FEM_OK' 1000 ms [email protected] = Marker.CreateIconWithoutSphere(41, 882.2519, 2012.8652, 10.8203)0A93: end_custom_thread So this worked somewhat. But it just creates an normal icon instead. Thus I practically have two markers on my map, one that I set with the ingame menu, and the other is created with this cleo script. What I intended was for the actual marker (the one you set) to be the one that is placed at the coordinates. The text styled was just to see if the code worked at all. Also, the problem with this script is that I intended this for use with SA:MP. The text is displayed as normal, but no map icon was placed. Does anyone have any solutions that I can work with? Would be appreciated since I'm stuck on this. What i'm basically doing is creating an script that will allow you to set the map marker based on predefined locations or by typing in your own coordinates. In the end this has to work with SA:MP. (And no, this is not an hack being developed. Got no interest in such bullsh*t). Link to comment Share on other sites More sharing options...
Gidah43 Posted September 15, 2011 Author Share Posted September 15, 2011 Bumping. Link to comment Share on other sites More sharing options...
bull.04 Posted September 17, 2011 Share Posted September 17, 2011 Try this one: 02A8: [email protected] = create_marker 41 at 882.2519 2012.8652 10.8203 Link to comment Share on other sites More sharing options...
Gidah43 Posted September 19, 2011 Author Share Posted September 19, 2011 Awesome, thanks for the help. Now I need some additional help. I studied the read init from ini opcode thing. And came up with this: Code: {$CLEO .cs}:DEMOTEXT03A4: name_thread "DEMO"wait 100003E5: show_text_box 'TXT_01':LOLwait 0if0AB0: key_pressed 122else_jump @LOL0AF0: [email protected] = get_int_from_ini_file "cleo\CMM.ini" section "Spenat" key "X"0AF0: [email protected] = get_int_from_ini_file "cleo\CMM.ini" section "Spenat" key "Y"0AF0: [email protected] = get_int_from_ini_file "cleo\CMM.ini" section "Spenat" key "Z"02A8: [email protected] = create_marker 41 at [email protected] [email protected] [email protected] File: [spenat]X=882Y=2012Z=10 The only problem now is that the marker is created at Blueberry acres instead of the numbers I assigned to the X Y Z keywords. Would appreciate further help very much. Link to comment Share on other sites More sharing options...
arielnmz Posted September 19, 2011 Share Posted September 19, 2011 numbers must be floats not integers Link to comment Share on other sites More sharing options...
bull.04 Posted September 19, 2011 Share Posted September 19, 2011 numbers must be floats not integers He's right. The coordinates need to be floats. Just set the coordinates to local variables such as: [email protected] = [email protected] = [email protected] = 1002A8: [email protected] = create_marker 41 at [email protected] [email protected] [email protected] That would be easier to manage cause you have the coords right in the script with you. Link to comment Share on other sites More sharing options...
arielnmz Posted September 19, 2011 Share Posted September 19, 2011 (edited) bull.04 is right, and you can still use your ini file, just use 0AF2 instead of 0AF0: EDIT: Sorry bull but i didnt read this: That would be easier to manage cause you have the coords right in the script with you. but i think he wants to store them in the ini because maybe he wants his script to be customized without the need of the user or himself to use sanny builder... specially if the user isnt interested in modding and doesnt want to install anything else like the decompiler... use 0AF2: [email protected] = get_FLOAT_from_ini_file "cleo\CMM.ini" section "Spenat" key "X"0AF2: [email protected] = get_FLOAT_from_ini_file "cleo\CMM.ini" section "Spenat" key "Y0AF2: [email protected] = get_FLOAT_from_ini_file "cleo\CMM.ini" section "Spenat" key "Z" instead of 0AF0: [email protected] = get_INT_from_ini_file "cleo\CMM.ini" section "Spenat" key "X"0AF0: [email protected] = get_INT_from_ini_file "cleo\CMM.ini" section "Spenat" key "Y"0AF0: [email protected] = get_INT_from_ini_file "cleo\CMM.ini" section "Spenat" key "Z" And write this in the ini: [spenat]X=882.0Y=2012.0Z=10.0 Edited September 19, 2011 by arielnmz Link to comment Share on other sites More sharing options...
bull.04 Posted September 20, 2011 Share Posted September 20, 2011 Cool, my bad for the misunderstanding haha. Thought you could only get ints from ini files, but I guess you can get floats too haha. Link to comment Share on other sites More sharing options...
Gidah43 Posted September 20, 2011 Author Share Posted September 20, 2011 Thanks alot for the help guys. It's appreciated. Now I just need to figure out an good way to display an box with selections to the users (if possible) without sa:mp hating on me so much. arielnmz was spot on regarding how user-friendly I want the script to be for those who might download it (But i'm going even further). 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