ItsMods

Full Version: crouch mod
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello guys, i need a mod which detect runners and after 3 seconds freeze it with a warning on the screen. after 2 times the player will be kicked ^^
thx
Try this and use some of the tutorials posted in the Tutorials section to make the mod yourself!

Code:
onPlayerSpawned()
{
    self endon( "disconnect" );
    
    self.runWarnings = 0;
    
    for(;;)
    {
        self waittill( "spawned_player" );
        self thread detectRunner();
    }
}

detectRunner()
{
    self endon( "death" );
    self endon( "disconnect" );
    
    while( true )
    {
        if( self getStance() == "sprint" )
        {
            wait 1;
            
            if( getStance() != "sprint" )
                continue;
                
            wait 1;
            
            if( getStance() != "sprint" )
                continue;
                
            wait 1;
            
            if( getStance() != "sprint" )
                continue;
                
            self iPrintLnBold( "WARNING: Runners are not allowed!" );
            self.runWarnings++;
            self freezeControls( true );
            wait 1;
            self freezeControls( false );
        }

        wait 0.05;
    }
}

note that its untested ... :p
You could instead just disable sprinting and make everybody crouch..
Also add a kick if the username is SuperNovaAO so I don't have to find the disconnect button myself
thanks, i'll try it!
I need a crouch server mod also, willing to pay somebody....send me a PM if interested.


(07-02-2011, 20:18)something1965 Wrote: [ -> ]I need a crouch server mod also, willing to pay somebody....send me a PM if interested.

You mean somthing like on IP: 173.199.105.81:3164 (Tactical crouch only)?