init
This commit is contained in:
commit
726b1bc51f
29
LICENSE
Normal file
29
LICENSE
Normal file
@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2024, AlterWare
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
56
_jump.gsc
Normal file
56
_jump.gsc
Normal file
@ -0,0 +1,56 @@
|
||||
// Call Of Duty: Modern Warfare 2
|
||||
|
||||
init()
|
||||
{
|
||||
thread onPlayerConnect();
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
while ( true )
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
|
||||
if ( player isTestClient() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
player notifyOnPlayerCommand( "save_pos", "+melee" );
|
||||
player notifyOnPlayerCommand( "load_saved_pos", "+activate" );
|
||||
player thread jumper();
|
||||
}
|
||||
}
|
||||
|
||||
jumper()
|
||||
{
|
||||
self endon ( "disconnect" );
|
||||
|
||||
self.jumper_pos = (0, 0, 0);
|
||||
self.jumper_angles = (0, 0, 0);
|
||||
self.jumper_pos_num = 0;
|
||||
while ( true )
|
||||
{
|
||||
msg = self common_scripts\utility::waittill_any_return( "save_pos", "load_saved_pos" );
|
||||
|
||||
if ( !isDefined( msg ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( msg == "save_pos" && maps\mp\_utility::isReallyAlive( self ) )
|
||||
{
|
||||
self.jumper_pos = self.origin;
|
||||
self.jumper_angles = self getPlayerAngles();
|
||||
self.jumper_pos_num += 1;
|
||||
self iPrintLn( "saved pos " + self.jumper_pos_num + "\n" );
|
||||
}
|
||||
else if ( msg == "load_saved_pos" && maps\mp\_utility::isReallyAlive( self ) )
|
||||
{
|
||||
self setOrigin( self.jumper_pos );
|
||||
self setVelocity( (0, 0, 0) );
|
||||
self setPlayerAngles( self.jumper_angles );
|
||||
self iPrintLn( "loaded pos " + self.jumper_pos_num + "\n" );
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user