Help with Ghost Mode

Posts 1–9 of 9 · Page 1 of 1
Help with Ghost Mode
[PHP]bool ghostmode;
int move8 = 0;
int move6 = 0;
int move4 = 0;[/PHP]

[PHP] if(GetAsyncKeyState(VK_NUMPAD9)&1){
//Ghostmode
if(ghostmode==true){
while(true) {
if(GetAsyncKeyState(VK_UP)&1) {
move8+=1;
}

if(GetAsyncKeyState(VK_DOWN)&1) {
move8+=-1;
}

if(GetAsyncKeyState(VK_LEFT)&1) {
move4+=1;
}

if(GetAsyncKeyState(VK_RIGHT)&1) {
move4+=-1;
}

PushToConsole("CamMaxPosZOffset "+move8);
PushToConsole("CamMaxPosXOffset "+move6);
PushToConsole("CamMaxPosYOffset "+move4);
Sleep(100);
}
ghostmode=false;
} else {
move8=0;
move6=0;
move4=0;
PushToConsole("CamMaxPosZOffset 0");
PushToConsole("CamMaxPosXOffset 0");
PushToConsole("CamMaxPosYOffset 0");
ghostmode=true;
}
}[/PHP]

Help me with Ghost mode. Is this totally wrong??
Well you are not allowed to release ghost mode in this site
Quote Originally Posted by qddW$#%^jtyjtyj View Post
Well you are not allowed to release ghost mode in this site
Yes you are...
You can release semi ghost modes.
If your doing it like this you can't turn it off so if ghostmode is one time on you cannot turn it off cuz of the "while(true)" ur in this loop forever!! U can't get out of the while(true) you have to do it in another way I'll post a solution later cuz i have to go now

think about it please =)

Ok here is the code you may use ;-) i didnt tested so look over it


the structure is this:
1. if 9 is pressed then switch ghostmode from on/off to on/off
2. look what it is if its on then do ghostmode else dont do ghostmode
3. do it all from the beginning
[php]
ghostmode=false;
while(true)
{
your hacks...
your hacks...
.
.
.

if(GetAsyncKeyState(VK_NUMPAD9)<0) //Ghostmode
{
if(ghostmode==true)
{
ghostmode=false;
}
else
{
ghostmode=true;
}

if(ghostmode==true)
{
if(GetAsyncKeyState(VK_UP)&1)
{
move8+=1;
}

if(GetAsyncKeyState(VK_DOWN)&1)
{
move8+=-1;
}

if(GetAsyncKeyState(VK_LEFT)&1)
{
move4+=1;
}

if(GetAsyncKeyState(VK_RIGHT)&1)
{
move4+=-1;
}

PushToConsole("CamMaxPosZOffset "+move8);
PushToConsole("CamMaxPosXOffset "+move6);
PushToConsole("CamMaxPosYOffset "+move4);
}
else
{
move8=0;
move6=0;
move4=0;
PushToConsole("CamMaxPosZOffset 0");
PushToConsole("CamMaxPosXOffset 0");
PushToConsole("CamMaxPosYOffset 0");
}
}
Sleep(100);
}
[/php]

I hope i helped you

PS: mods if its really not allowed to post this i'm sorry please dont ban me just delete this =)
Quote Originally Posted by dadum02 View Post
[PHP]bool ghostmode;
int move8 = 0;
int move6 = 0;
int move4 = 0;[/PHP]

[PHP] if(GetAsyncKeyState(VK_NUMPAD9)&1){
//Ghostmode
if(ghostmode==true){
while(true) {
if(GetAsyncKeyState(VK_UP)&1) {
move8+=1;
}

if(GetAsyncKeyState(VK_DOWN)&1) {
move8+=-1;
}

if(GetAsyncKeyState(VK_LEFT)&1) {
move4+=1;
}

if(GetAsyncKeyState(VK_RIGHT)&1) {
move4+=-1;
}

PushToConsole("CamMaxPosZOffset "+move8);
PushToConsole("CamMaxPosXOffset "+move6);
PushToConsole("CamMaxPosYOffset "+move4);
Sleep(100);
}
ghostmode=false;
} else {
move8=0;
move6=0;
move4=0;
PushToConsole("CamMaxPosZOffset 0");
PushToConsole("CamMaxPosXOffset 0");
PushToConsole("CamMaxPosYOffset 0");
ghostmode=true;
}
}[/PHP]

Help me with Ghost mode. Is this totally wrong??
Ok so first of all:

Don't use GetAsyncKeyState(VK_HERE) &stuff)
Just do:
GetAsyncKeyState(Vk_Here)
It's less prone to errors

Next, use my tutorial on templates to add integers to your strings
It looks nicer than what you are doing now and is less prone to error

Lastly use don't put it in a while loop
Do something like:

while(true){
if( GetAsyncKeyState(VK_W) ) { // VK_W is not defined by default so you'll need to change this
PushToConsole("Camthingystring");
}

This'll shove you to ghost mode as long as you have the key 'w' pressed

-SCHiM

Ps: remember to check out on my tutorial on templates, to append integers to strings

}
Quote Originally Posted by schim View Post
while(true){
if( GetAsyncKeyState(VK_W) ) { // VK_W is not defined by default so you'll need to change this
PushToConsole("Camthingystring");
}

This'll shove you to ghost mode as long as you have the key 'w' pressed

-SCHiM
u know that VK_W can also be replaced by a char:
test this:
GetAsyncKeyState('W');
trust me it works :3 i use f for fly so yeah...
i wanna delete this post
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us