Results 1 to 8 of 8
  1. #1
    liwei8257's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0

    need codes to get secoundary weapon.

    here is the situation
    i want to replace players secondary weapon,then i should get it first,but i don't know how.
    I can get first gun by this : firstgun=self getCurrentWeapon();
    but what should I can to get secondary weapon?
    I tried
    firstgun=self getCurrentWeapon();
    self takeWeapon(self getCurrentWeapon());
    secgun = self GetWeaponsListPrimaries();
    just take firstgun away and get the secgun,but i failed .

    anyone can help me ?
    Thanks!~~~~~~~~~~~~~~~~
    Last edited by liwei8257; 07-01-2011 at 07:11 PM. Reason: spelling mistake

  2. #2
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    I'm pretty sure it is just
    Code:
    self getSecondaryWeapon();


    The lines in my Steam are i's

  3. The Following User Says Thank You to Nachos For This Useful Post:

    liwei8257 (07-01-2011)

  4. #3
    liwei8257's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Nachos View Post
    I'm pretty sure it is just
    Code:
    self getSecondaryWeapon();
    i tried just like this
    Code:
    self takeWeapon(self getSecondaryWeapon());
    and......i get this :script compile error
    unknown function.........
    T_T
    i'm making a pc gsc,does that matter?

  5. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic
    self get currentoffhand();

     
    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

  6. The Following User Says Thank You to Jorndel For This Useful Post:

    liwei8257 (07-01-2011)

  7. #5
    liwei8257's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Jorndel View Post
    self get currentoffhand();
    i tried then it stands for a frag or c4 etc. but not a secondary weapon
    Last edited by liwei8257; 07-01-2011 at 07:12 PM.

  8. #6
    LEGiiTxCHAOTiiC's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Chicago
    Posts
    200
    Reputation
    39
    Thanks
    72
    self giveWeapon( "deserteagle_fmj_mp" );

    //idk I forgot GSC for the most part. Correct me.

  9. #7
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic
    If you have an weapon you want to remove. Like G18 or any other weapons.

    You have another way.
    But then you need to have the weapons name to remove them.

     
    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

  10. The Following User Says Thank You to Jorndel For This Useful Post:

    liwei8257 (07-01-2011)

  11. #8
    liwei8257's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    i don't know the right way for secondary weapon.
    but i finish my mod in another way
    in _class.gsc i find something like secondaryName and primaryName.
    then it works out.

    my mod anti attachments rpg/gay18/at4
    and it works in _class.gsc.

    thanks guys! finally over~~~~