Starter Weapon Script

Locked
Gustavo6046
Posts: 125
Joined: Wed May 13, 2015 9:04 pm

Starter Weapon Script

Post by Gustavo6046 »

Note: This is NOT exactly about the Q3 source, but since it is still a script I though it best fits here.
So, this script is put in a mod folder in autorun.cfg. When you run that mod, you will always start a map with a weapon (and every five seconds 1 pt of ammo of that weapon will be added) as long as you press ONCE the numpad star. Of course you can bind to other keys but, if you press MORE than once, then the loop will intensify and FPS will DROP.

Code: Select all

set NoWeapStart "wait 2"
set ShotgunStart "give shotgun; wait 5000; vstr ShotgunStart"
set GrenadeStart "give grenade launcher; wait 5000; vstr GrenadeStart"
set RocketStart "give rocket launcher; wait 5000; vstr RocketStart"
set LightningStart "give lightning gun; wait 5000; vstr LightningStart"
set RailStart "give railgun; wait 5000; vstr RailStart"
set PlasmaStart "give plasma gun; wait 5000; vstr PlasmaStart"
set BfgStart "give bfg10k; wait 5000; vstr BfgStart"
set GrapplingStart "give grappling hook; wait 5000; vstr GrapplingStart"
set sv_starterweap "vstr ShotgunStart"
bind kp_star "wait; vstr starterweap; wait"
Also the weapon given depends in the variable sv_starterweap, which can be:
  • NoWeapStart (aka. no starter weapon)
  • ShotgunStart (the default)
  • GrenadeStart
  • RocketStart
  • LightningStart
  • RailStart
  • PlasmaStart
  • BfgStart
  • GrapplingStart
All of which should be self-explanatory.

However I might still test it in my spare time.
[color=#BF4000]Who cares with me?[/color] [color=#BF0080]Everyone ragequit![/color]
coltonquake3
Posts: 199
Joined: Sun Dec 06, 2015 3:38 am

Re: Starter Weapon Script

Post by coltonquake3 »

I'll probably modify th@ script to start a match with all the weapons to start with (including the grappling hook).
Locked