View previous topic :: View next topic |
Author |
Message |
xXx123 Expert Cheater
Reputation: 0
Joined: 27 Sep 2007 Posts: 118
|
Posted: Sun Dec 02, 2007 11:37 am Post subject: vb6 question |
|
|
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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Dec 02, 2007 5:43 pm Post subject: |
|
|
What programming language?
_________________
- Retired. |
|
Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sun Dec 02, 2007 5:45 pm Post subject: |
|
|
Wiccaan wrote: | What programming language? |
Topic title.
|
|
Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Sun Dec 02, 2007 6:10 pm Post subject: |
|
|
Oh, I already answered his question, he PMed me, so I guess you should ignore this
_________________
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Dec 02, 2007 6:11 pm Post subject: |
|
|
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 |
|
 |
xXx123 Expert Cheater
Reputation: 0
Joined: 27 Sep 2007 Posts: 118
|
Posted: Mon Dec 03, 2007 5:54 am Post subject: |
|
|
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 |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Mon Dec 03, 2007 5:59 am Post subject: |
|
|
Lol you don't explain clearly, and my way works
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 |
|
 |
xXx123 Expert Cheater
Reputation: 0
Joined: 27 Sep 2007 Posts: 118
|
Posted: Mon Dec 03, 2007 6:09 am Post subject: |
|
|
ummm can you give me please give me the freeze code XD?
|
|
Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Mon Dec 03, 2007 6:15 am Post subject: |
|
|
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
_________________
|
|
Back to top |
|
 |
xXx123 Expert Cheater
Reputation: 0
Joined: 27 Sep 2007 Posts: 118
|
Posted: Mon Dec 03, 2007 7:22 am Post subject: |
|
|
thanks
|
|
Back to top |
|
 |
Devilizer Master Cheater
Reputation: 0
Joined: 22 Jun 2007 Posts: 451
|
Posted: Mon Dec 03, 2007 6:27 pm Post subject: |
|
|
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 |
|
 |
xXx123 Expert Cheater
Reputation: 0
Joined: 27 Sep 2007 Posts: 118
|
Posted: Tue Dec 04, 2007 9:30 am Post subject: |
|
|
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 |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Tue Dec 04, 2007 2:34 pm Post subject: |
|
|
Ok, can you stop PMing me and posting?
You can either just pm me, or post here, not both...
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 |
|
 |
Devilizer Master Cheater
Reputation: 0
Joined: 22 Jun 2007 Posts: 451
|
Posted: Tue Dec 04, 2007 5:01 pm Post subject: |
|
|
Lol, just learn vb by default before making trainers >.<
|
|
Back to top |
|
 |
|