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 


vb6 question

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
xXx123
Expert Cheater
Reputation: 0

Joined: 27 Sep 2007
Posts: 118

PostPosted: Sun Dec 02, 2007 11:37 am    Post subject: vb6 question Reply with quote

probably youre all tired from all my questions XD

so um... how do an option to turn off/on an hack...
with buttoms and the menues if the hack turned on its checked ot if its turned of its not...

so ummm whats the code...

thank you =P
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Dec 02, 2007 5:43 pm    Post subject: Reply with quote

What programming language?
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Dec 02, 2007 5:45 pm    Post subject: Reply with quote

Wiccaan wrote:
What programming language?


Topic title.
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Sun Dec 02, 2007 6:10 pm    Post subject: Reply with quote

Oh, I already answered his question, he PMed me, so I guess you should ignore this
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Dec 02, 2007 6:11 pm    Post subject: Reply with quote

Flyte wrote:
Wiccaan wrote:
What programming language?


Topic title.


Bah had two tabs open, read the title from the wrong one lol..

@xXx123: Use a boolean check along with toggling the boolean based on an action, such as clicking a button.

A quick example of how to do this:
Create a new project, and add the following to your form:
- 1 command button, named Command1
- 1 Timer named Timer1, set the interval to 10 and enabled to true.
- 1 Textbox named Text1, change the value to 1.

And the code:

Code:
Option Explicit

Private bEnabled As Boolean

Private Sub Command1_Click()
    ' Toggle The bEnabled Boolean
    bEnabled = IIf(bEnabled = True, False, True)
   
    ' Toggle The Command Text
    Command1.Caption = IIf(bEnabled = True, "Disable", "Enable")
End Sub

Private Sub Timer1_Timer()
    ' Check If Enabled And Add 1 To The Text Value
    If bEnabled = True Then
        Text1.Text = Val(Text1.Text) + 1
    End If
End Sub


The timer is mainly used to show you how to toggle something and constantly check. You can also use a simple if then check inside the command button code to do your cheat as well.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
xXx123
Expert Cheater
Reputation: 0

Joined: 27 Sep 2007
Posts: 118

PostPosted: Mon Dec 03, 2007 5:54 am    Post subject: Reply with quote

i didnt understand any thing from what you wrote:| and bladers code doesnt really work... it doesnt do anything exept of changing the buttoms caption... or its my mistake i dont know... any way can you give more easy way of doing this (disable/enable cheat in buttoms and menues)?
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Mon Dec 03, 2007 5:59 am    Post subject: Reply with quote

Lol you don't explain clearly, and my way works Confused

You just said to enable/disable a hack, which is setting the value, then returning it to it's original value
It's different if you want to freeze the variable such as unlimited health
So which one do you want?...

_________________
Back to top
View user's profile Send private message
xXx123
Expert Cheater
Reputation: 0

Joined: 27 Sep 2007
Posts: 118

PostPosted: Mon Dec 03, 2007 6:09 am    Post subject: Reply with quote

ummm can you give me please give me the freeze code XD?
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Mon Dec 03, 2007 6:15 am    Post subject: Reply with quote

Kk
First you need a button and a timer, command1 and timer1

On your command1 code, put this (assuming your caption is off)
Code:
If timer1.enabled = false then
timer1.enabled = true
command1.caption = "On"
Else
timer1.enabled = false
command1.caption = "Off"
End If


Now on your timer, set enabled to false and interval to 1
Now add the code to set any variable you want and you should know how to do that already Rolling Eyes

_________________
Back to top
View user's profile Send private message
xXx123
Expert Cheater
Reputation: 0

Joined: 27 Sep 2007
Posts: 118

PostPosted: Mon Dec 03, 2007 7:22 am    Post subject: Reply with quote

thanks
Back to top
View user's profile Send private message
Devilizer
Master Cheater
Reputation: 0

Joined: 22 Jun 2007
Posts: 451

PostPosted: Mon Dec 03, 2007 6:27 pm    Post subject: Reply with quote

Code:
If timer1.enabled = false then
timer1.enabled = true
command1.caption = "On"
Else
timer1.enabled = false
command1.caption = "Off"
End If

Set interval to 1 and enabled to false on your timer, and it'll work.


Edit: Sorry! Didn't see blader's post >.<
I pressed the reply button after i read the question, lol.
Back to top
View user's profile Send private message
xXx123
Expert Cheater
Reputation: 0

Joined: 27 Sep 2007
Posts: 118

PostPosted: Tue Dec 04, 2007 9:30 am    Post subject: Reply with quote

here is my code wht it doesnt work?

Private Sub Command1_Click()
If Timer1.Enabled = False Then
Timer1.Enabled = True
Command1.Caption = "have all items unlimited:ON"
Else
Timer1.Enabled = False
Command1.Caption = "have all items unlimited:OFF"
End If
If Command1.Caption = "have all items unlimited:OFF" Then
Command1.Caption = "have all items unlimited:ON"
Call x.SetVariable("plume", 11)
Else
Command1.Caption = "have all items unlimited:OFF"
Call x.SetVariable("plume", 0)
End If
End Sub
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Tue Dec 04, 2007 2:34 pm    Post subject: Reply with quote

Ok, can you stop PMing me and posting?
You can either just pm me, or post here, not both... Rolling Eyes
I answered it now, but you should learn how to do more things in VB, all you know is basically setvariable command right?

_________________
Back to top
View user's profile Send private message
Devilizer
Master Cheater
Reputation: 0

Joined: 22 Jun 2007
Posts: 451

PostPosted: Tue Dec 04, 2007 5:01 pm    Post subject: Reply with quote

Lol, just learn vb by default before making trainers >.<
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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