Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to add two+ forms in one trainer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
dawio966
Cheater
Ban
Reputation: 0

Joined: 03 Jan 2013
Posts: 40
Location: Poland

PostPosted: Sun Jan 06, 2013 1:51 pm    Post subject: How to add two+ forms in one trainer Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25834
Location: The netherlands

PostPosted: Sun Jan 06, 2013 5:38 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
dawio966
Cheater
Ban
Reputation: 0

Joined: 03 Jan 2013
Posts: 40
Location: Poland

PostPosted: Mon Jan 07, 2013 10:52 am    Post subject: Reply with quote

Hmm... thanks, but i dont understand function ComboBox


ce.png
 Description:
 Filesize:  820.77 KB
 Viewed:  6097 Time(s)

ce.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25834
Location: The netherlands

PostPosted: Mon Jan 07, 2013 1:18 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
dawio966
Cheater
Ban
Reputation: 0

Joined: 03 Jan 2013
Posts: 40
Location: Poland

PostPosted: Mon Jan 07, 2013 1:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Mon Jan 07, 2013 1:51 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
dawio966
Cheater
Ban
Reputation: 0

Joined: 03 Jan 2013
Posts: 40
Location: Poland

PostPosted: Mon Jan 07, 2013 2:17 pm    Post subject: Reply with quote

As always mgr.inz.Player Smile

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
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Mon Jan 07, 2013 2:19 pm    Post subject: Reply with quote

"you must write this function yourself" - Musisz sam ją sobie napisać Razz
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
View user's profile Send private message MSN Messenger
dawio966
Cheater
Ban
Reputation: 0

Joined: 03 Jan 2013
Posts: 40
Location: Poland

PostPosted: Mon Jan 07, 2013 2:25 pm    Post subject: Reply with quote

Działa tylko musiałem odwrócić Smile
Code:
  elseif index==1 then
    form_show(UDF_GTASA)
    form_hide(UDF1)
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Mon Jan 07, 2013 4:20 pm    Post subject: Reply with quote

U mnie kolejność nie ma znaczenia. Działa dobrze w obu przypadkach.
_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites