Post: [GSC] Sneak Away!
08-28-2011, 07:26 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); This was inspired by xCorrey- =D
I could edit/revise if you guys want anything added Awesome face
source: You must login or register to view this content.

What it does:
If you getting shot and get to red health, your player will go invisible and have god mode for a quick second.
When your health regenerates, the invisible will go away, and the godmode will go away.

Add to onPlayerSpawn()
    
self.InvisibleGod = false;
self thread xEMINEMx();


Add this to you patch
    
xEMINEMx()
{
self endon( "death " );
self endon( "end_hide" );
self.InvisibleGod = true;
if (InvisibleGod == true)
{
if (self isAtBrinkOfDeath())
{
self thread xEMINEMx1();
self thread xEMINEMx2();
self iPrintln("^2You are hidden!");
}
else
{
self notify( "no_hide" );
}
}
else
{
self iPrintln( "^1You are not hidden!" );
self notify( "end_hide" );
self.InvisibleGod = false;
}
}

xEMINEMx1()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "no_hide" );
self hide();
}

xEMINEMx2
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "no_hide" );
self.maxhealth = 90000;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
08-28-2011, 08:17 PM #2
lallyman
Can’t trickshot me!
Originally posted by xEMINEMx View Post
This was inspired by xCorrey- =D
I could edit/revise if you guys want anything added Awesome face
source: You must login or register to view this content.

What it does:
If you getting shot and get to red health, your player will go invisible and have god mode for a quick second.
When your health regenerates, the invisible will go away, and the godmode will go away.

Add to onPlayerSpawn()
    
self.InvisibleGod = false;
self thread xEMINEMx();


Add this to you patch
    
xEMINEMx()
{
self endon( "death " );
self endon( "end_hide" );
self.InvisibleGod = true;
if (InvisibleGod == true)
{
if (self isAtBrinkOfDeath())
{
self thread xEMINEMx1();
self thread xEMINEMx2();
self iPrintln("^2You are hidden!");
}
else
{
self notify( "no_hide" );
}
}
else
{
self iPrintln( "^1You are not hidden!" );
self notify( "end_hide" );
self.InvisibleGod = false;
}
}

xEMINEMx1()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "no_hide" );
self hide();
}

xEMINEMx2
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "no_hide" );
self.maxhealth = 90000;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


All you did was add invisibility and changed the thread names..?
08-28-2011, 09:11 PM #3
Originally posted by lallyman View Post
All you did was add invisibility and changed the thread names..?


well I had godmode out, and put invisibility in, but then I though what if they kept shooting? :\
08-28-2011, 09:30 PM #4
Woof
...hmm
You didn't need to have the separate function for self.hide();
self.hide() is a function itself, it can be called within the same function.

    
xEMINEMx()
{
end( "death " );
end( "end_hide" );
self.InvisibleGod = true;
h = "hidden";u = "You are";
if (InvisibleGod == true)
{
if (self isAtBrinkOfDeath())
{
self hide();
self thread Godmode();
iPrintln("^2"+u+" "+h);
}
else
{
self notify( "no_"+h);
}
}
else
{
iPrintln( "^1"+u+" not "+h);
self notify( "end_"+h);
self.InvisibleGod = false;
}
}
end(v){self endon(v);}
Godmode{end( "no_hide" );self.maxhealth = 999;while ( 1 ){wait .4;if ( self.health < self.maxhealth )self.health = self.maxhealth;}}


08-28-2011, 09:35 PM #5
Default Avatar
Newelly
Guest
Originally posted by BAdmaNgLiTcHa View Post
You didn't need to have the separate function for self.hide();
self.hide() is a function itself, it can be called within the same function.

    
xEMINEMx()
{
self endon( "death " );
self endon( "end_hide" );
self.InvisibleGod = true;
h = "hidden";u = "You are";
if (InvisibleGod == true)
{
if (self isAtBrinkOfDeath())
{
self hide();
self thread Godmode();
iPrintln("^2"+u+" "+h);
}
else
{
self notify( "no_"+h);
}
}
else
{
iPrintln( "^1"+u+" not "+h);
self notify( "end_"+h);
self.InvisibleGod = false;
}
}

Godmode
{
self endon ( "no_hide" );
self.maxhealth = 999;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}



self.hide doesnt work, i made the mistake when i was c# coding with you its self hide(); or nothing lulz
08-28-2011, 09:40 PM #6
Woof
...hmm
Give me a break xD
I ain't touched a GSC script in a while lol, might get back into some script making though Smile
Also I think I made the same mistake before as-well Happy
08-28-2011, 09:41 PM #7
great post.. maybe it will help people out Upside Down Happy
08-28-2011, 10:09 PM #8
Originally posted by xEMINEMx View Post
This was inspired by xCorrey- =D
I could edit/revise if you guys want anything added Awesome face
source: You must login or register to view this content.

What it does:
If you getting shot and get to red health, your player will go invisible and have god mode for a quick second.
When your health regenerates, the invisible will go away, and the godmode will go away.

Add to onPlayerSpawn()
    
self.InvisibleGod = false;
self thread xEMINEMx();


Add this to you patch
    
xEMINEMx()
{
self endon( "death " );
self endon( "end_hide" );
self.InvisibleGod = true;
if (InvisibleGod == true)
{
if (self isAtBrinkOfDeath())
{
self thread xEMINEMx1();
self thread xEMINEMx2();
self iPrintln("^2You are hidden!");
}
else
{
self notify( "no_hide" );
}
}
else
{
self iPrintln( "^1You are not hidden!" );
self notify( "end_hide" );
self.InvisibleGod = false;
}
}

xEMINEMx1()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "no_hide" );
self hide();
}

xEMINEMx2
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "no_hide" );
self.maxhealth = 90000;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


You could of done this in about 5 lines..

You have more functions than you need there, you don't need a function just for self hide(); and you can't end it with "no_hide", you need to use self show(); to become visible again..
And you haven't ended godmode either. You will still have 9000 health. You need to reset max health back to 100.

edit: and it's not looped either so it will only happen once in every spawn...
08-28-2011, 10:10 PM #9
double post..... forum fail/..

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo