Post: Save/Load Positions
10-15-2011, 06:11 AM #1
lallyman
Can’t trickshot me!
(adsbygoogle = window.adsbygoogle || []).push({}); K, this is my first script that i wanted to post. its alot similar to DT's one in his thread but i assure you i didn't steal it. i made it from scratch. its prob one of the shitiest scripts out there :P

    
Lallyman()
{
self endon("disconnect");
for(;Winky Winky
{
self waittill("Pressed_LT");
self.Position = self.Origin;
self.LookAngles = self.Angles;
self iPrintln("^5Position Saved");
}
}

Lallyman2()
{
self endon("disconnect");
for(;Winky Winky
{
self waittill("Pressed_RT");
wait 0.5;
self setOrigin(self.Position);
self setPlayerAngles(self.LookAngles);
self iPrintln("^5Position Loaded");
}
}


If your menu/patch does not already have this, add it. i think...
    
MonitorButtons()
{
self endon("death");
self endon("disconnect");
for(;Winky Winky
{
if(self UseButtonPressed())
{
self notify("Pressed_X");
wait .3;
}
if(self AttackButtonPressed())
{
self notify("Pressed_RB");
wait .3;
}
if(self AdsButtonPressed())
{
self notify("Pressed_LB");
wait .3;
}
if(self SecondaryOffhandButtonPressed())
{
self notify("Pressed_LT");
wait .3;
}
if(self FragButtonPressed())
{
self notify("Pressed_RT");
wait .3;
}
if(self MeleeButtonPressed())
{
self notify("Pressed_Melee");
wait .3;
}
wait .05;
}
}


i hope to be making some other scripts to and get better Happy
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to lallyman for this useful post:

247Yamato, Blackstorm, Choco, Diddles2Fresshh, lovebros, Rea
10-15-2011, 03:24 PM #11
Taylor
Former Black Knight.
Originally posted by x. View Post
You should put those into one function rather than two really. And that won't just work on double tap like that , it will just wait for that button to be pressed twice. You could press it once, wait 30 seconds and then press it again and it will still run the function.


So Your Saying Remobve The Wait 0.01?
10-15-2011, 04:36 PM #12
Originally posted by xYARDSALEx View Post
So Your Saying Remobve The Wait 0.01?
You need to add a time command into it. You need something like this..

    watchC4AltDetonate()
{
self endon("death");
self endon( "disconnect" );
self endon( "detonated" );
level endon( "game_ended" );

buttonTime = 0;
for( ;; )
{
if ( self UseButtonPressed() )
{
buttonTime = 0;
while( self UseButtonPressed() )
{
buttonTime += 0.05;
wait( 0.05 );
}

println( "pressTime1: " + buttonTime );
if ( buttonTime >= 0.5 )
continue;

buttonTime = 0;
while ( !self UseButtonPressed() && buttonTime < 0.5 )
{
buttonTime += 0.05;
wait( 0.05 );
}

println( "delayTime: " + buttonTime );
if ( buttonTime >= 0.5 )
continue;

if ( !self.c4Array.size )
return;

self notify ( "alt_detonate" );
}
wait ( 0.05 );
}
}
10-15-2011, 05:58 PM #13
Taylor
Former Black Knight.
Originally posted by x. View Post
You need to add a time command into it. You need something like this..

    watchC4AltDetonate()
{
self endon("death");
self endon( "disconnect" );
self endon( "detonated" );
level endon( "game_ended" );

buttonTime = 0;
for( ;; )
{
if ( self UseButtonPressed() )
{
buttonTime = 0;
while( self UseButtonPressed() )
{
buttonTime += 0.05;
wait( 0.05 );
}

println( "pressTime1: " + buttonTime );
if ( buttonTime >= 0.5 )
continue;

buttonTime = 0;
while ( !self UseButtonPressed() && buttonTime < 0.5 )
{
buttonTime += 0.05;
wait( 0.05 );
}

println( "delayTime: " + buttonTime );
if ( buttonTime >= 0.5 )
continue;

if ( !self.c4Array.size )
return;

self notify ( "alt_detonate" );
}
wait ( 0.05 );
}
}


That Is Something New To Me, Ummm I Don't Get It, Ill Just Have Studman Explain It I Guess Unless You Wann Add Me On MSN: [email][email protected][/email]
10-15-2011, 06:33 PM #14
Originally posted by xYARDSALEx View Post
That Is Something New To Me, Ummm I Don't Get It, Ill Just Have Studman Explain It I Guess Unless You Wann Add Me On MSN: [email][email protected][/email]
It's the double click C4 detonator. It only works if you double click in a certain time. Just take out the bits you don't need and put your function in..

And I don't use MSN, sorry
10-15-2011, 06:42 PM #15
Taylor
Former Black Knight.
Originally posted by x. View Post
It's the double click C4 detonator. It only works if you double click in a certain time. Just take out the bits you don't need and put your function in..

And I don't use MSN, sorry


ok ill mess around with it til i figure it out, but anyway, skype?
10-15-2011, 06:55 PM #16
Originally posted by xYARDSALEx View Post
ok ill mess around with it til i figure it out, but anyway, skype?
no skype, aim, msn, bbm etc etc
All that shit is the first thing I take off my computer when I get a new one Winky Winky
10-15-2011, 07:02 PM #17
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by x. View Post
no skype, aim, msn, bbm etc etc
All that shit is the first thing I take off my computer when I get a new one Winky Winky


Yo x_DaftVader_x you know xCorrey's menu base the second one (the one from OptimusPine patch i think) i tried to add the overflow fix that Karoolus posted but i encountered a problem it showed the title text and let me scroll and choose options just you couldnt see the options :S. you know how to fix this? so i can have another go at adding it.
10-15-2011, 08:06 PM #18
Correy
I'm the Original
Originally posted by lallyman View Post
K, this is my first script that i wanted to post. its alot similar to DT's one in his thread but i assure you i didn't steal it. i made it from scratch. its prob one of the shitiest scripts out there :P

    
Lallyman()
{
self endon("disconnect");
for(;Winky Winky
{
self waittill("Pressed_LT");
self.Position = self.Origin;
self.LookAngles = self.Angles;
self iPrintln("^5Position Saved");
}
}

Lallyman2()
{
self endon("disconnect");
for(;Winky Winky
{
self waittill("Pressed_RT");
wait 0.5;
self setOrigin(self.Position);
self setPlayerAngles(self.LookAngles);
self iPrintln("^5Position Loaded");
}
}


If your menu/patch does not already have this, add it. i think...
    
MonitorButtons()
{
self endon("death");
self endon("disconnect");
for(;Winky Winky
{
if(self UseButtonPressed())
{
self notify("Pressed_X");
wait .3;
}
if(self AttackButtonPressed())
{
self notify("Pressed_RB");
wait .3;
}
if(self AdsButtonPressed())
{
self notify("Pressed_LB");
wait .3;
}
if(self SecondaryOffhandButtonPressed())
{
self notify("Pressed_LT");
wait .3;
}
if(self FragButtonPressed())
{
self notify("Pressed_RT");
wait .3;
}
if(self MeleeButtonPressed())
{
self notify("Pressed_Melee");
wait .3;
}
wait .05;
}
}


i hope to be making some other scripts to and get better Happy


much easier..
    
Save_Load()
{
self endon( "death" );
while(1)
{
if ( self attackButtonPressed() )
{
self.SavedPos = self.origin;
}
if ( self adsButtonPressed() )
{
self moveTo( self.SavedPos );
}
}


don't need any of the button coding or nothing Smile
10-15-2011, 08:45 PM #19
This was in the first COD4 patch i ever used lol. but i have no clue where the code is, so thank you for this.. by the way, if I used this in Search and Destroy, went to the other team's spawn and put it there, could I teleport there at the beginning of the round? or would it just reset it. Just a thought Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo