| View previous topic :: View next topic |
| Author |
Message |
dawio966 Cheater
Reputation: 0
Joined: 03 Jan 2013 Posts: 40 Location: Poland
|
Posted: Sun Jan 06, 2013 1:51 pm Post subject: How to add two+ forms in one trainer |
|
|
English version:
Hi,
I want create MEGA trainer (many games in one cheat)
how can I do that when i choose game in trainer, udf to be changed to another.
Sorry for my english.
Screen
img541.imageshack.us/img541/125/mtdawio966.png
_______________________________________________________
Polska wersja:
Cześć,
Chcę stworzyć MEGA trainer, w którym będzie po wybraiu gry zmieniał się Form na inny (udf).
Czy da się w ogóle w jednym UDF zrobić drugiego?
Screen z mojego trainera
img541.imageshack.us/img541/125/mtdawio966.png
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25834 Location: The netherlands
|
Posted: Sun Jan 06, 2013 5:38 pm Post subject: |
|
|
form_hide(formname) and form_show(formname) are useful methods to switch between windows
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
dawio966 Cheater
Reputation: 0
Joined: 03 Jan 2013 Posts: 40 Location: Poland
|
Posted: Mon Jan 07, 2013 10:52 am Post subject: |
|
|
Hmm... thanks, but i dont understand function ComboBox
| Description: |
|
| Filesize: |
820.77 KB |
| Viewed: |
6097 Time(s) |

|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25834 Location: The netherlands
|
Posted: Mon Jan 07, 2013 1:18 pm Post subject: |
|
|
use combobox_getItemIndex(UDF1_CEComboBox1) to find which item is selected
Then put some code in the onchange event property and in there call combobox_getItemIndex to find out which item has been selected, and do your action based on that. (hide udf1, and show the form you wish)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
dawio966 Cheater
Reputation: 0
Joined: 03 Jan 2013 Posts: 40 Location: Poland
|
Posted: Mon Jan 07, 2013 1:36 pm Post subject: |
|
|
Sorry, but I am very beginner.
I do not know where to learn lua.
I have:
Main: UDF1
If choose GTA SA from combobox in UDF1 then visible UDF_GTASA
| Code: | function CEComboBox1ChangeBounds(sender)
combobox_getItemIndex(UDF_GTASA_CEComboBox1)
end |
I don't understand, I do not know what to write there...
There FULL script trainer
| Code: | form_show(UDF1) -- aby wyświetliło okienko
setMethodProperty(UDF1,'OnClose',function (sender) closeCE(); return caFree end) -- wyłączanie trainera po zamknięciu okna
function CELabel1Click(sender) -- label MEGA Trainer
shellExecute( "url" )
shellExecute( "url" )
shellExecute( "url" )
end
function CEToggleBox1Click(sender) -- button Instrukcja
print "1.Wlacz gre // Run game"
print "2.Uruchom trainer // Run trainer"
print "3.Wybierz gre w trainerze // Choose the game in trainer."
print "Mozesz juz oszukiwac :D // You can use options!"
print "Zasukskrybuj mnie na YouTube :D // Subbscribe me on YouTube :D"
end
function CEImage2Click(sender) -- profil youtube
shellExecute( "url" )
end
function CEImage3Click(sender) -- profil cheat engine
shellExecute( "url" )
end
function CEImage4Click(sender) -- profil mpcforum
shellExecute( "url" )
end
function CEComboBox1ChangeBounds(sender)
combobox_getItemIndex(UDF_GTASA_GTA_SA)
end |
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jan 07, 2013 1:51 pm Post subject: |
|
|
Firstly, use onChange event.
| Code: |
function CEComboBox1Change(sender)
local index = combobox_getItemIndex(sender)
-- changing visibility
if index==0 then
hideotherForms() -- you must write this function yourself
form_show(UDF_GTAIV)
elseif index==1 then
hideotherForms()
form_show(UDF_GTASA)
elseif index==2 then
hideotherForms()
form_show(UDF_METIN2)
elseif index==3 then
hideotherForms()
form_show(UDF_MASSEFFECT)
end
-- rest of code
-- (........)
end
|
_________________
|
|
| Back to top |
|
 |
dawio966 Cheater
Reputation: 0
Joined: 03 Jan 2013 Posts: 40 Location: Poland
|
Posted: Mon Jan 07, 2013 2:17 pm Post subject: |
|
|
As always mgr.inz.Player
Error:[string "form_show(UDF1) -- aby wyświetliło okienk..."]:38: attempt to call global 'hideotherForms' (a nil value)
Error:[string "form_show(UDF1) -- aby wyświetliło okienk..."]:35: attempt to call global 'hideotherForms' (a nil value)
to jest funkcja, która ukrywa wybrany Form tak?
Bo wpisuje
| Code: | if index==0 then
hideotherForms(UDF1) -- you must write this function yourself
form_show(UDF_GTAIV)
elseif index==1 then
hideotherForms(UDF1)
form_show(UDF_GTASA)
elseif index==2 then
hideotherForms()
form_show(UDF_METIN2)
elseif index==3 then
hideotherForms()
form_show(UDF_MASSEFFECT)
end |
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jan 07, 2013 2:19 pm Post subject: |
|
|
"you must write this function yourself" - Musisz sam ją sobie napisać
Albo zamiast niej użyć kilku form_hide() dla pozostałych okienek. Chyba że chsesz ukryć główne okno, to wtedy tylko jedno form_hide(UDF1) przed form_show(........).
_________________
|
|
| Back to top |
|
 |
dawio966 Cheater
Reputation: 0
Joined: 03 Jan 2013 Posts: 40 Location: Poland
|
Posted: Mon Jan 07, 2013 2:25 pm Post subject: |
|
|
Działa tylko musiałem odwrócić
| Code: | elseif index==1 then
form_show(UDF_GTASA)
form_hide(UDF1)
|
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jan 07, 2013 4:20 pm Post subject: |
|
|
U mnie kolejność nie ma znaczenia. Działa dobrze w obu przypadkach.
_________________
|
|
| Back to top |
|
 |
|