JoBoz

Wep Switch GSC Mw2

Jun 5th, 2011
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. WepCheck() //checks if the weapon is any of the listed below
  2. {
  3. self endon("death");
  4. self endon("disconnect");
  5.  
  6. currentWeapon = self getCurrentWeapon();
  7. if(isSubStr(currentWeapon, "spas12")) //checks if the CURRENT weapon is Spas
  8. {
  9. self thread Bullet();
  10. }
  11. }
  12.  
  13. WepSwitchCheck() //this will check your weapon if you switch weapon. After 5 mili-secs
  14. {
  15. self endon("death");
  16. self endon("disconnect");
  17.  
  18. while(1) {
  19. self notifyOnPlayerCommand("switchwep", "weapnext"); //If weapon switch is pressed
  20. self waittill("switchwep"); //Waits for the Wep Switch to be pressed
  21. wait 0.5; //Wait 5 mili-Sec, so it don't run to fast so it checks the old wep.
  22. self thread WepCheck(); //threads the wep check when the Switch key is pressed
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment