Results 1 to 7 of 7
  1. #1
    slash.sniper's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    India
    Posts
    15
    Reputation
    10
    Thanks
    0
    My Mood
    Fine

    Syntax for giveweapon ?

    I used this code on isnipe mod, where i wanted to give barrett , but it shud change back to intervention after the ammo is finished in barrett which i have given as 5 here ..
    And the same button cant be pressed again to get another barrett

    whats wrong in this syntax ?

    it gives script compile error !!

    please help

    Code:
    Barrett() 
    { 
       self endon("disconnect"); 
       self endon("death"); 
        
       self notifyOnPlayerCommand("B", "+actionslot 3");
        while(1) 
        {
    		self waittill( "B" );
    
    			self takeWeapon("cheytac_fmj_xmags_mp");
    			self giveWeapon( "barrett_fmj_silencer_mp", 8, false );
    			self switchToWeapon( "barrett_fmj_silencer_mp");
    			self setWeaponAmmoClip( "barrett_fmj_silencer_mp", 5 );
    			self iPrintlnBold("Barrett ON");
    			if ( self getweaponammostock( "barrett_fmj_silencer_mp") = 0 ) ;
    			self takeWeapon( "barrett_fmj_silencer_mp");
    			self giveWeapon( "cheytac_fmj_xmags_mp", 8, false );
    			self switchToWeapon( "cheytac_fmj_xmags_mp");
    			self GiveMaxAmmo( "cheytac_fmj_xmags_mp");
    			wait 0.5;
       }
    }

  2. #2
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,940
    Reputation
    574
    Thanks
    5,004
    My Mood
    Twisted
    Quote Originally Posted by slash.sniper View Post
    it gives script compile error !!
    And therefore should say which line provides the error. Could you tell us ?
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

  3. #3
    slash.sniper's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    India
    Posts
    15
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    Quote Originally Posted by Horror View Post

    And therefore should say which line provides the error. Could you tell us ?
    It doesnt tell which line has error , it just gives an error script compile error , i m using iw4play client to check mod

  4. #4
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,940
    Reputation
    574
    Thanks
    5,004
    My Mood
    Twisted
    Quote Originally Posted by slash.sniper View Post
    It doesnt tell which line has error , it just gives an error script compile error , i m using iw4play client to check mod
    I've used similar clients (repz) and they always gave me the line
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

  5. #5
    slash.sniper's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    India
    Posts
    15
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    Quote Originally Posted by Horror View Post

    I've used similar clients (repz) and they always gave me the line
    Ok let me download repz then I ll post back
    Last edited by slash.sniper; 03-03-2014 at 07:27 AM. Reason: Spell mistake

  6. #6
    slash.sniper's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    India
    Posts
    15
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    hi, i just checked mod in repz also , i could not get any line error, can u tell what can be the code for a replacement of primary with another primary weapon such that it changes back to 1st primary when ammo in 2nd primary finishes ??

  7. #7
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,940
    Reputation
    574
    Thanks
    5,004
    My Mood
    Twisted
    I'm not that experienced with mods, sorry ...
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

Similar Threads

  1. [Release] Visual Studio syntax highlighting for Windows types
    By acedcafe in forum C++/C Programming
    Replies: 1
    Last Post: 12-30-2011, 07:19 AM
  2. [Solved] Syntax giveWeapon
    By mirc00 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 08-24-2011, 12:23 PM
  3. [Help] WHAT IS THE HOTKEYS SYNTAX FOR NUMPADS - DEV-C++
    By hack2learn in forum C++/C Programming
    Replies: 6
    Last Post: 07-10-2011, 09:02 PM
  4. Hacks for mmorpg?
    By suppaman in forum General Game Hacking
    Replies: 6
    Last Post: 10-17-2010, 12:04 PM
  5. Too Ownage For Words.
    By Flawless in forum Art & Graphic Design
    Replies: 8
    Last Post: 12-28-2005, 05:55 PM