[BT] GodofZombie

adding bounce to b3

Recommended Posts

here is the scipt from bounce 

i didnt test it myself though but you can if you know who to write script

learn from here scripting
CoD4x_Server/scriptdocumentation at master · callofduty4x/CoD4x_Server (github.com)

 

bounce(){
	player = getPlayer( arg1, pickingType );
	if( isDefined( player ) && player isReallyAlive() )
	{		
		for( i = 0; i < 2; i++ )
			player bounceinit( vectorNormalize( player.origin - (player.origin - (0,0,20)) ), 200 );

		player iPrintlnBold( "^3You were bounced by the Admin" );
		iPrintln( "^1[AL]^2[^1[AL]^2[Admin]]: ^7Bounced " + player.name + "^7." );
	}
}


bounceinit( pos, power )//This function doesnt require to thread it
{
	oldhp = self.health;
	self.health = self.health + power;
	self setClientDvars( "bg_viewKickMax", 0, "bg_viewKickMin", 0, "bg_viewKickRandom", 0, "bg_viewKickScale", 0 );
	self finishPlayerDamage( self, self, power, 0, "MOD_PROJECTILE", "none", undefined, pos, "none", 0 );
	self.health = oldhp;
	self thread bounce2();
}
bounce2()
{
	self endon( "disconnect" );
	wait .05;
	self setClientDvars( "bg_viewKickMax", 90, "bg_viewKickMin", 5, "bg_viewKickRandom", 0.4, "bg_viewKickScale", 0.2 );
}

you need to call the function 

 

and in b3 
bounce = cmd bounce:<ARG:FIND_PLAYER:PID> 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.