Results 1 to 6 of 6
  1. #1
    hannemannen's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0

    Get Gun everytime i spawn?

    Okay, So i am making my first mod, witch is a qs/wh mod and it gives predator missiles if i press "3" and if i press "n" it give invisibility for 45 seconds. ofc i want an intervention and i get that when i spawn the first time, but if i die, and respawn i get my class setup how do i get the intervention everytime i spawn?

    BTW here is the code:
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    		self takeAllWeapons();
    		self ThermalVisionFOFOverlayOn();
    		self player_recoilScaleOn(0);
    		self iPrintlnBold( "^0HnnesQsWhMod");
    		self thread Qscope();
    		self thread doDvars();
    		self thread dohide();
    		self thread PredKS();
    		self giveWeapon("usp_akimbo_fmj_mp", 0, true);
    		while(1) {
    			self GiveMaxAmmo("usp_akimbo_fmj_mp");
    		self giveWeapon("cheytac_fmj_xmags_mp", 0, 0);
    		while(1) {
    			self GiveMaxAmmo("cheytac_fmj_xmags_mp");
    			}
    		}
    
    	}
    }
    And here is the doDvars() and the invisibility and pred missile :
    Code:
    doDvars()
    {
    	setDvar( "compassEnemyFootstepEnabled", "1" );
    	setDvar( "compassEnemyFootstepMaxRange", "99999" );
    	setDvar( "compassEnemyFootstepMaxZ", "99999" );
    	setDvar( "compassEnemyFootstepMinSpeed", "0" );
    	setDvar( "compassRadarUpdateTime", "0.001" );
    	setDvar( "compassFastRadarUpdateTime", "2" );
    	setDvar("perk_weapSpreadMultiplier", 0.00001);
    	setDvar("g_speed", 300);
    	setDvar("g_gravity", 600);
    	self sayall("^0Hey Everyone!");
    	self sayall("^0Press N for Invinsibility!");
    
    	self maps\mp\perks\_perks::givePerk("specialty_marathon");
    	self maps\mp\perks\_perks::givePerk("specialty_extendedmags");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
    	self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
    	self maps\mp\perks\_perks::givePerk("specialty_extraammo");
    	self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    	self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    }
    
    dohide()
    {
      self endon("disconnect");
      
      while(1)
      {
        self notifyOnPlayerCommand("N", "+actionslot 1");
        self waittill("N");
        self hide();
    self iPrintlnBold("Youre invisable");
        wait 30;
        self show();
    self iPrintlnBold("youre visable ");
        wait 1;
    self iPrintlnBold("recharging for 45 seconds ");
        wait 44;
    self iPrintlnBold("recharged");
      }
    }
    
    PredKS()
    {
    self endon("disconnect");
    
    while(1) {
    self notifyOnPlayerCommand("3", "+actionslot 3");
    self waittill("3");
    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
    }
    }

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    try to add this then: (It might be something wrong in this. Long time since I used GSC)
    Code:
    weaponchecker()
    {
    self endon("death");
    self endon("disconnect");
    
    for(;;)
    {
    if(self getCurrentWeapon() != "cheytac_fmj_xmags_mp")
    {
    self giveWeapon("cheytac_fmj_xmags_mp", 0, false);
    wait 0.1;
    self switchtoweapon("cheytac_fmj_xmags_mp", 0, false);
    wait 0.01;
    self GiveMaxAmmo("cheytac_fmj_xmags_mp");
    }
    else
    {
    break;
    }
    }
    }
    Last edited by Jorndel; 08-10-2011 at 03:08 AM. Reason: Missed }

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #3
    hannemannen's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    Thanks man gonna try it out

    oh btw i think there are more "{"'s than "}"'s
    Last edited by hannemannen; 08-10-2011 at 02:56 AM.

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by hannemannen View Post
    Thanks man gonna try it out

    oh btw i think there are more "{"'s than "}"'s
    Yeh, I edited that now. Thanks for that.
    Guess I didn't focus 100% on it. I am kinda angry for this

    But, you don't use the "standar" weapon give code anyway so...
    Last edited by Jorndel; 08-10-2011 at 03:10 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. #5
    hannemannen's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Jorndel View Post
    Yeh, I edited that now. Thanks for that.
    Guess I didn't focus 100% on it. I am kinda angry for this

    But, you don't use the "standar" weapon give code anyway so...
    Oh, whats the standard weapon give code then?

  6. #6
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by hannemannen View Post
    Oh, whats the standard weapon give code then?

    This one is:
    weapon()
    {
    self endon( "disconnect" );
    while ( 1 )
    {
    self takeallweapons();
    wait 0.1;
    self giveWeapon( "cheytac_fmj_xmags_mp", 0, false );
    wait 0.05;
    self switchtoweapon("cheytac_fmj_xmags_mp" );
    self GiveMaxAmmo("cheytac_fmj_xmags_mp");
    break;
    }
    }
    Last edited by Jorndel; 08-14-2011 at 02:14 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

Similar Threads

  1. [Release] Get Gun Powder Easy [MOD]
    By Son Goku in forum Minecraft Mods
    Replies: 19
    Last Post: 04-17-2011, 11:28 PM
  2. Replies: 8
    Last Post: 08-26-2010, 06:51 AM
  3. How do I get guns forever on Warrock?
    By 702 in forum WarRock - International Hacks
    Replies: 5
    Last Post: 05-11-2008, 07:01 AM
  4. Replies: 2
    Last Post: 06-10-2007, 08:01 AM
  5. how do u get KWR guns in warrock?
    By omgwtfbbqpwn2 in forum WarRock - International Hacks
    Replies: 14
    Last Post: 05-19-2007, 03:24 AM

Tags for this Thread