Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- weapon_endroom()
- {
- level.weapon_trig = getEnt( "weapon_endroom_trig", "targetname"); //The trigger
- jump = getEnt( "jump_weapon_origin", "targetname" ); //the origin the jumper will teleport
- acti = getEnt( "activator_weapon_origin", "targetname" ); //the origin the acti will teleport
- while(1) //loop
- {
- level.weapon_trig waittill( "trigger", player ); //waits until the jumper activates the room
- level.oldTrig delete();
- level.bounceTrig delete();
- level.knife_trig delete();
- level.sniper_trig delete();
- if( !isDefined( level.weapon_trig ) ) //defines that it is the weapon trigger
- return;
- player setOrigin( jump.origin ); //teleports the jumper
- player TakeAllWeapons(); //takes all weapons from jumper
- player GiveWeapon( "ak74u_mp" );
- player giveMaxAmmo( "ak74u_mp" );
- player GiveWeapon( "p90_mp" );
- player giveMaxAmmo( "p90_mp" );
- player.maxhealth = 100;
- player switchToWeapon( "tomahawk_mp" );
- //jumper weapon
- if( isDefined( level.activ ) && isAlive( level.activ ) ) //makes sure the activator exists and is alive, otherwise it'll try to do things to a non-existant acti (._. )
- {
- level.activ setOrigin( acti.origin ); //teleports acti
- level.activ TakeAllWeapons(); //takes all weapons from acti
- level.activ GiveWeapon( "ak74u_mp" );
- level.activ giveMaxAmmo( "ak74u_mp" );
- level.activ GiveWeapon( "p90_mp" );
- level.activ giveMaxAmmo( "p90_mp" );
- level.activ.maxhealth = 100; //gives players normal health if damaged
- level.activ SwitchToWeapon( "tomahawk_mp" ); //this line means they switch to the weapon
- }
- wait 0.05;
- iPrintLnBold( " ^4" + player.name + " ^7has chosen ^4WEAPON ^7room!" ); // announces on screen the player name and the knife room
- while( isAlive( player ) && isDefined( player ) ) //if the player is alive the room will stay closed so no one can enter.
- wait 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment