Post: Giving gun experience
01-04-2016, 02:48 AM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); Does anyone know how to increase the gun experience via code in order to unlock attachments easily? So far I noticed that the dvar
    scr_gunxpscale

can unlock all attachments after a single kill if set to something really high like 99999999 so the script would be:
    gunExperienceLobby()
{
setDvar("scr_gunxpscale", 99999999);
}

I searched for references to this dvar in the original GSC files but none exist.

After using the function above, if I quit the match and look at my classes, the attachments stay unlocked. However, now my online profile will refuse to save so any changes made will be lost when the game is shut off. As you can see, this is not good after all.

Either way, I need a function which gives a certain gun experience without getting a kill so I found
    addWeaponStat(weaponName, statName, increment);

However, can it increase the gun experience? I do know that it's used for unlocking camos and it works fine for that purpose. Smile

Thank you Kryptus
(adsbygoogle = window.adsbygoogle || []).push({});
01-04-2016, 02:50 AM #2
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
Does anyone know how to increase the gun experience via code in order to unlock attachments easily? So far I noticed that the dvar
    scr_gunxpscale

can unlock all attachments after a single kill if set to something really high like 99999999 so the script would be:
    gunExperienceLobby()
{
setDvar("scr_gunxpscale", 99999999);
}

I searched for references to this dvar in the original GSC files but none exist.

After using the function above, if I quit the match and look at my classes, the attachments stay unlocked. However, now my online profile will refuse to save so any changes made will be lost when the game is shut off. As you can see, this is not good after all.

Either way, I need a function which gives a certain gun experience without getting a kill so I found
    addWeaponStat(weaponName, statName, increment);

however, can it increase the experience and how is the gun experience stat called?

Thank you Kryptus


I am pretty sure you can't modify weapon stuff w/ gsc
01-04-2016, 02:52 AM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by GentleSlugger View Post
I am pretty sure you can't modify weapon stuff w/ gsc

You can, for unlocking camos. Also giving kills, headshots and such works and shows up in the combat record.

The only thing you definitely can't do is subtracting since only adding is possible.
01-04-2016, 03:13 AM #4
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
You can, for unlocking camos. Also giving kills, headshots and such works and shows up in the combat record.

The only thing you definitely can't do is subtracting since only adding is possible.


Oh yeah it is possible but making guns from semi auto to auto.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo