natesmithzombies

start_weap_func

Feb 11th, 2017
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. function new_start_weapon()
  2. {
  3. level flag::wait_till( "all_players_connected" );
  4. take_old_weapon = true; // to give the weapon in addition to starting weapon, set this to false
  5. players = GetPlayers();
  6. foreach( player in players )
  7. {
  8. old_gun = player GetCurrentWeapon();
  9. if( !take_old_weapon )
  10. player TakeWeapon( old_gun );
  11.  
  12. gun = GetWeapon( "ray_gun" ); // Change to your weapon file console name
  13. player GiveWeapon( gun );
  14. player SwitchToWeapon( gun );
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment