KaizoM Posted March 7, 2017 Share Posted March 7, 2017 First of all, English is not my native language, if they feel that my writing is awful. I'm doing an interactive panel and well, I've already read how this works from Sanny Builder (this is my first post and also my first experience with programming). I know the syntax is as follows (for example): 08D4: 0 @ = create_panel_with_title 'CHT12' position 200.0 120.0 width 220.0 columns 1 interactive 1 background 1 alignment 0 The function to skip from button to button is working automatically with the keys UP / DOWN as well with W / S and also G / H But nothing else ... And I would like to know if you can navigate the panel with other buttons, (for example: with 'Q' and 'E'. I know you can set the buttons with which you can enter and exit the panel, so I guess you can change which buttons you can navigate with, right? Thanks for your attention. Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/ Share on other sites More sharing options...
Sloth- Posted March 8, 2017 Share Posted March 8, 2017 Read ZAZ tutorials, everything you need to know is there. About your second question: yes, i guess you can control the panel with alternative buttons. There is an opcode to manipulate active row: 090E: set_panel $1153 active_row $1148 So your code should check if you pressed "Q" or "E", and then add or substract the active row, and call 090E. I never tried, but it should work. KaizoM 1 Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069444449 Share on other sites More sharing options...
ZAZ Posted March 8, 2017 Share Posted March 8, 2017 (edited) @: Sloth , he already have read the tut because he posted my usage: "The function to skip from button to button is working automatically with the keys UP / DOWN as well with W / S and also G / H But nothing else ..." and his question is, if there's an alternatively code for the navigation instead the hardcoded keypress function by UP / DOWN as well with W / S and also G / H The answer is NO Edited March 9, 2017 by ZAZ KaizoM 1 Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069444684 Share on other sites More sharing options...
Sloth- Posted March 8, 2017 Share Posted March 8, 2017 But you could manipulate panel "by hand", right? Of course i consider it impractical, because default buttons are more intuituve. YkrYkm and KaizoM 2 Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069444760 Share on other sites More sharing options...
KaizoM Posted March 9, 2017 Author Share Posted March 9, 2017 @: Sloth , he already have read the tut because he posted my usage: "The function to skip from button to button is working automatically with the keys UP / DOWN as well with W / S and also G / H But nothing else ..." and his question is, if there's an alternatively code for the navigation instead the hardcoded keypress function by UP / DOWN as well with W / S and also G / H The answer is NO Mmm...Well ... at least I tried. Thanks dude, and yes, I had already read your tut xD Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069446511 Share on other sites More sharing options...
KaizoM Posted March 9, 2017 Author Share Posted March 9, 2017 But you could manipulate panel "by hand", right? Of course i consider it impractical, because default buttons are more intuituveI. I know it is more comfortable to navigate with W / S, UP / DOWN, G / N. I can't say the reason why I wanted to change the navigation buttons ... it's a secret .... Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069446606 Share on other sites More sharing options...
ZAZ Posted March 9, 2017 Share Posted March 9, 2017 Sorry, i should not post, if i'm tired I was wrong the required code is 090E: set_panel 1@ active_row 0 last param, in example above 0 is first button and so on Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069446647 Share on other sites More sharing options...
DK22Pac Posted March 9, 2017 Share Posted March 9, 2017 (edited) {$CLEO}0A8C: write_memory 0x5809AB size 1 val 0x0A vp 1 // replace 'G' with 'E'0A8C: write_memory 0x5809B2 size 1 val 0x3A vp 1 // replace 'G' with 'E'0A8C: write_memory 0x580A76 size 1 val 0x0E vp 1 // replace 'H' with 'Q'0A8C: write_memory 0x580A7D size 1 val 0x3E vp 1 // replace 'H' with 'Q'0A93: terminate_this_custom_script plugin-sdk: More ellegant solution (without replacing 'G' and 'H' keys: #include "plugin.h"#include "game_sa\CControllerConfigManager.h"using namespace plugin;class MyMenuControls {public: static bool MyCheckForMenuUp() { return CallAndReturn<bool, 0x540950>() || CallMethodAndReturn<bool, 0x52E450>(&ControlsManager, 'E'); } static bool MyCheckForMenuDown() { return CallAndReturn<bool, 0x540980>() || CallMethodAndReturn<bool, 0x52E450>(&ControlsManager, 'Q'); } MyMenuControls() { patch::RedirectCall(0x580984, MyCheckForMenuUp); patch::RedirectCall(0x580A4F, MyCheckForMenuDown); }} myPlg; Edited March 9, 2017 by DK22Pac Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069446892 Share on other sites More sharing options...
KaizoM Posted March 10, 2017 Author Share Posted March 10, 2017 {$CLEO}0A8C: write_memory 0x5809AB size 1 val 0x0A vp 1 // replace 'G' with 'E'0A8C: write_memory 0x5809B2 size 1 val 0x3A vp 1 // replace 'G' with 'E'0A8C: write_memory 0x580A76 size 1 val 0x0E vp 1 // replace 'H' with 'Q'0A8C: write_memory 0x580A7D size 1 val 0x3E vp 1 // replace 'H' with 'Q'0A93: terminate_this_custom_script plugin-sdk: More ellegant solution (without replacing 'G' and 'H' keys: #include "plugin.h"#include "game_sa\CControllerConfigManager.h"using namespace plugin;class MyMenuControls {public: static bool MyCheckForMenuUp() { return CallAndReturn<bool, 0x540950>() || CallMethodAndReturn<bool, 0x52E450>(&ControlsManager, 'E'); } static bool MyCheckForMenuDown() { return CallAndReturn<bool, 0x540980>() || CallMethodAndReturn<bool, 0x52E450>(&ControlsManager, 'Q'); } MyMenuControls() { patch::RedirectCall(0x580984, MyCheckForMenuUp); patch::RedirectCall(0x580A4F, MyCheckForMenuDown); }} myPlg; Well ... that worked ... but it really is not what I'm looking for, I did't want to say it because it's a project but ... I wanted to make an interactive panel only for the second player, since the panels can only be moved by the first player Is there any way that the second player can interact with the panels? Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069448703 Share on other sites More sharing options...
DK22Pac Posted March 11, 2017 Share Posted March 11, 2017 Is there any way that the second player can interact with the panels? Yes, there's some secret way for your secret project. miclin 1 Link to comment https://gtaforums.com/topic/883078-little-help-with-interactive-panel-gta-sa/#findComment-1069449776 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