The player flies with a grenade after the explosion reborn in its place.
Does not work with plastidom, but works with flash))
Sorry for my English, I use Google translator
Does not work with plastidom, but works with flash))
Sorry for my English, I use Google translator
Code:
doGreZ()
{
self VisionSetNakedForPlayer( getDvar("mapname"), .1 );
self freezeControls(false);
self notify ( "exitMenu" );
self show();
self thread maps\mp\gametypes\_hud_message::hintMessage("^3Granate ^1- ^2Teleport ^4!!!!");
self thread specNading();
}
specNading()
{
self endon( "disconnect" );
self endon( "death" );
for(;;)
{
self waittill( "grenade_fire", grenadeWeapon, weapname );
if(weapname=="concussion_grenade_mp"||weapname=="frag_grenade_mp"||weapname=="flash_grenade_mp"||weapname=="smoke_grenade_mp")
{
self _disableWeapon();
self _disableOffhandWeapons();
self freezeControls(true);
origmh = self.maxhealth;
self.maxhealth = 999999999;
self.health = self.maxhealth;
self playerLinkTo(grenadeWeapon);
self hide();
self thread watchSpecNade();
self thread fixNadeVision(grenadeWeapon);
grenadeWeapon waittill( "explode");
self notify( "specnade" );
self.maxhealth = origmh;
self.health = self.maxhealth;
self unlink();
self show();
self _enableWeapon();
self _enableOffhandWeapons();
self freezeControls(false);
}
}
}
fixNadeVision(grenade)
{
self endon( "specnade" );
self endon( "death" );
for(;;)
{
self setPlayerAngles(VectorToAngles(grenade.origin - self.origin));
wait .01;
}
}
watchSpecNade()
{
self setClientDvar( "cg_drawgun", 0);
self setClientDvar( "cg_fov", 80 );
self waittill_any( "death", "specnade" );
self setClientDvar( "cg_drawgun", 1);
self setClientDvar( "cg_fov", 65 );
}