Note: This is a script that I do not plan on expanding upon, and was made for fun and practicing my programming "skills." Suggestions on what to add are cool, though.
Lowdown:
Each player can level up their weapons (Yeah, their weapons, lol.) by killing opponents. Same idea as any other RPG server, but instead of leveling up yourself, you level up whatever weapon you use most often. Higher level = More Damage Done. Pretty simple idea and code, created within several days.
Flaws or Problems I had:
1. One shot kill weapons are always one shot kills, so leveling them is meaningless, right? :(
2. I couldn't find anything to detect what a player's weapon was, except GetPlayerStat(i,'Primary')
which wouldn't do exactly what I wanted, since secondary weapons are level-able, too. To solve this I created an array which works beautifully, however I feel that there might be a better way.
3. Something that had to be typed over and over by me was the formula for the expReq variable. Any time I changed that little math-y formula once, I had to change it two other times. There's definitely an easier way to do that, dunno what it is.
4. In general, this is a stupid idea, because at some point all players have their favorite weapon at the highest levels and are one-shotting each other every time, which isn't fun. Please don't criticize me on this fact, I am so very aware of it.
Questions/comments are nice, criticism that will make me a better programmer would be awesome.
If anyone wants to use this or edit this at their own will, feel free, it's not like this is a huge project that I want to hide from the world.
Code is attached.