Both GetMaxClients() and MaxClients are only available once the map is loaded, and should not be used in OnPluginStart().
Which is done so in basic-attributes.sp, is there cause for concern?
It's there in OnPluginStart for late-loads/reloads.
If the plugin isn't late-loaded, MaxClients will be 0 (and no clients will be connected), so that loop won't do anything. However, if the plugin is (re)loaded afterwards, if any clients are in-game, they'll get hooked for the plugin's hooks (TakeDamage(+Post), TraceAttack)
No, sorry. I still want to do it, but really, both versions of the plugin are sort of a mess right now. Again, I could just release it, and possibly have someone else (better-minded at CS than I) maintain it...but ech. It's really half-assed.
I've got a little plan to clean up the TF2 version before the next release and hopefully, that will make the plugin neat enough to finally create the CS/Any version. ...Probably just CS, as I've thought about it, and it might get messy, having one plugin with weapons/attributes for multiple games. Maybe.
Hmm...I'm not sure if this is known,or just me,but it seems that I can't get something to work.I tried to make a rocket launcher work as a secondary.At first it was ok,but then I couldn't pull it out.Even disguising it as a sticky launcher didn't help!
Unfortunately, classnames (baseclass) have to match the slot they're designed to be in, if you want players to be able to easily use them. Rocket launchers always have to be primary weapons. If it isn't, then the only way you can use it (as far as I know) is by typing "use tf_weapon_rocketlauncher" in console every time you want to switch to it.
The Valve attribute "override projectile type" used to let you fire a projectile of your choice out of pretty much anything that wasn't melee weapons...but I don't think it works anymore, aside from wherever Valve's using it
Aww...Thanks anyways for the info.
Also,I have bad news.It seems that the override projectile works.Or at least for me?XD
I successfully replaced a flaregun's projectile as "2.0",or,rockets,so to speak.And it worked.No weapon switch problems,nothing.It does seem to work.Thanks anyways!
Edit:It appears that the server crashes somewhat frequently when it comes to that sort of weapons...I couldn't find any error logs about it either D:
Edit2:This seems to crash the server:
So, that's a Direct Hit with the baseclass of a Sticky Bomb Launcher that throw Rockets... Well, I may have an idea of the problem... xD
EDIT: Message from Abrandnewday(404) at MechaTheSlag (old) :
Be careful when using this attribute, as certain weapon/projectile combinations crashed my server when I tested them, such as a Stickybomb Launcher that shot Righteous Bison particles. This is a very touchy attribute, so be careful.
If that attribute still works, then that's great news
Quote:
Originally Posted by Mr.Orion
EDIT: Message from Abrandnewday(404) at MechaTheSlag (old) :
Be careful when using this attribute, as certain weapon/projectile combinations crashed my server when I tested them, such as a Stickybomb Launcher that shot Righteous Bison particles. This is a very touchy attribute, so be careful.
Oh wow, I never even noticed who posted that post on there.
But yeah, it's true; a number of projectiles fired from a sticky launcher (due to its charge mechanic, most likely) will cause a crash when you fire them. This is also true for certain other weapon types, I believe. However, trying out other projectiles on "standard"-firing weapons, like shotguns, miniguns, and rocket launchers, should be safe from crashes. Projectiles that won't work (due to the weapon's lack of a charge ability) will simply drop at your feet.
So, here it is, I've done the FULL LIST (or not) of attributes that can be made (from AW2, my head and what I saw).
I'm gonna update it when if I find new attributes, there's some of AW2 that I don't wrote in this list because I thought they were useless.
Also, sorry for the typos and if you can't read anything.
Attributes list
Hot Sauce - additive
> This is the Hot Sauce (Jarate, Mad Milk + Bleed).
> Value1 = duration.
> Value2 = bleed damage.
> "hot sauce" "10, 3"
Damage equals enemy health - percentage
> Add damage equals to enemy health.
> Value = multiplier.
> value * enemy health = damage
> Exemple : 0.5 * 300 = 150 | 2.0 * 300 = 600
> "health to damage" "0.5"
Speed while cloaked - percentage
> Increases spy's speed while cloaked.
> Value = multiplier.
> value * spy's speed = speed
> Exemple : 0.5 * 100% = 50% | 2.0 * 100% = 200%
> "speed while cloaked" "2.0"
Invisible on charge. (Demoman) - additive
> Demoman becomes invisible while he's charging.
> Value = yes or not.
> "invis on charge" "1"
Add ammo to clip on hit - percentage
> On hit, add ammos to clip based on damage
> Value = multiplier.
> value * damage = ammunitions.
> Exemple : 0.5 * 100 = 50 | 2.0 * 300 = 600
> "ammo on hit" "1.0"
Sniper loses charge when hit - additive
> Sniper lose charge when hit.
> Value = charge lost.
> charge - value = charge
> Exemple : 100% - 50% = 50% | 50% - 100% = 0%
> "sniper loses charge when hit" "50"
Retain charge on kill. (Sniper) - additive
> The Sniper will retain his charge at "whatever%" when he kills someone.
> Value = yes or not.
> "retain charge on kill" "1"
Reset afterburn on hit - additive
> Reset afterburn on hit.
> Value = yes or not.
> "reset afterburn on hit" "1"
Add charge based on damage (Medic) - percentage
> Add Übercharge based on damage.
> Value = multiplier.
> value * damage = charge
> Exemple : 0.5 * 20 = 10% | 1.0 * 65 = 65%
> "damage to charge" "0.5"
Übercharge is speed - percentage
> Übercharge gives speed.
> Value = multiplier.
> value * medic's speed = speed given to both
> Exemple : 0.5 * 107% = 53.5% | 2.0 * 107% = 214%
> "uber is speed" "2.0"
Assisted damage charges Übercharge - percentage
> Damage done by the patient charges the Übercharge by a percentage.
> Value = multiplier.
> value * patient's damage = charge
> Exemple : 0.5 * 25 = 12.5% | 1.5 * 65 = 97.5%
> "assist damage to charge" "1.5"
Übercharge on kill - percentage
> Get Übercharge when you kill someone.
> Value = charge
> charge + actual charge = charge...
> Exemple : 20% + 0% = 20% | 100% + 0% = 100%
> "add ubercharge on kill" "0.2"
Metal on kill - percentage
> Get metal when you kill someone.
> Value = metal
> metal + actual metal = metal
> Exemple : 100 + 0 = 100 | 150 + 50 = 200
Miss piss yourself - additive
> Miss piss yourself, idiot.
> Value = duration.
> Exemple : 10 = Piss yourself for 10 seconds.
> "miss piss yourself" "10"
Übercharge while demo charges - additive
> Demoman will be Übercharged (invulnerable) when charging.
> Value = yes or not.
> "ubercharge while charge" "1"
Arrow Rain - additive
> Alt-fire with an Huntsman/Crossbow will do an Arrow Rain of ??? arrows that deals ??? damage where you aim, at a max distance of ??? in a ??? radius.
> Value1 = arrows.
> Value2 = damage.
> Value3 = distance.
> Value4 = radius.
> Exemple : 10 arrows that deals 100 damages at a max distance of 600 in a 200 radius.
> "arrow rain" "10, 100, 600, 200"
Demo charge is no crit - additive
> Demoman won't get crit boost on charging.
> Value = yes or not.
> "charge crit mod disabled" "1"
Nonlethal - additive
> Cannot kill. It will make your ennemies to have at least 1 hp.
> Value = yes or not.
> "nonlethal" "1"
Speedup while burning - percentage
> If you burn, your speed will increases by a percentage.
> Value = multiplier.
> value * speed = speed
> Exemple : 0.5 * 100% = 50% | 2.0 * 100% = 200%
> "speedup while burning" "1.5"
EMP Sticky - additive
> EMP will disable buildings.
> Value = duration.
> "emp_sticky" "60.0"
Cannot Headshot before Bodyshot - additive
> You cannot headshot before a bodyshot.
> Value = yes or not.
> "no headshot before bodyshot" "1"
Buff is speed (BUFF) - additive/percentage
> Buff will gives speed.
> Value1 = duration.
> Value2 = speed.
> value * speed = speed
> Exemple : 1.5 * 100% = 150% | 3.0 * 100% = 300%
> "buff is speed" "10, 2.0"
Pipebomb Rain - additive
> Alt-fire with an Grenade Launcher will do an Pipebomb Rain of ??? pimpebombs that deals ??? damage where you aim, at a max distance of ??? in a ??? radius.
> Value1 = pipebombs.
> Value2 = damage.
> Value3 = distance.
> Value4 = radius.
> Exemple : 5 pipebombs that deals 300 damages at a max distance of 1000 in a 500 radius.
> "pipebomb rain" "5, 300, 1000, 500"
Triple arrows - additive
> Shoot 3 arrows with Huntsman/Crossbow.
> Value = spread angle.
> Exemple : 0.0 = 3 arrows that goes in the same way. | 10.0 = 3 arrows that goes to, somewhere.
> "triple arrows" "5.0"
Damage done is selfhurt - percentage
> Damage done to someone will hurt you.
> Value = multiplier.
> value * damage = selfhurt
> Exemple : 0.5 * 65 = 32.5 | 2.0 = 65 = 130
> "damage done is selfhurt" "1.5"
Alt fire is Oil - additive
> Oil is launched from your Flamethrower on the ground, that you can burn afterward.
> Value1 = duration.
> Value2 = damage.
> Exemple : 10 seconds of Oil that will deal 50 damage when burning.
> "altfire is oil" "10, 50"
Attack while cloaked - additive
> Attack while cloaked.
> Value = yes or not.
> "attack while cloaked" "1"
Cloak disabled until full - additive
> Cloak disabled until full.
> Value = yes or not.
> "cloak disabled until full" "1"
Controllable projectiles - additive
> Control your projectiles !
> Value = how much you can control them.
> Exemple : 0.25 = low control | 1.0 = full control.
> "control projectiles" "0.5"
Crit on disguise removal - additive
> Crit when your disguise is removed.
> Value = yes or not.
> "crit on undisguise" "1"
Crit on medics healing - additive
> When a medic heals you, you get crit.
> Value = yes or not.
> "crit on heal" "1"
Damage is explosive - additive
> Damage is explosive (Caber).
> Value1 = damage.
> Value2 = radius.
> Exemple : 1000 damage in a 1000 radius.
> "damage is explosive" "1000, 1000"
Damage is lifesteal - percentage
> Damage is lifesteal.
> Value = multiplier.
> value * damage done = heal
> Exemple : 0.5 * 60 = 30 | 3.0 * 100 = 300
> "lifesteal" "1.5"
Stun on hit - additive
> Stun on hit.
> Value = duration.
> Exemple : 10 seconds stun.
> "stun on hit" "10.0"
Earthquake on rocket jump land - additive
> Earthquake on rocket jump land.
> Value1 = damage.
> Value2 = radius.
> Exemple : Land after a rocket jump will deal 999 damage in a 9001 radius.
> "earthquake on rocket jump land" "999, 9001"
Evasion - percentage
> Get evasion. Other peoples will have a chance to miss you.
> Value = evasion.
> Exemple : 0.25 = 25% of evasiveness | 1.0 = 100% of evasiveness
> "evasion" "0.5"
Fastcloak on backstab - additive
> Cloak immediately after backstabbing someone.
> Value = yes or not.
> "fastcloak on backstab" "1"
No backstab - additive
> No backstab.
> Value = yes or not.
> "no backstab" "1"
Reduced fall damag - percentage
> Reduce fall damage.
> Value = multiplier.
> value * fall damage = fall damage
> Exemple : 0.1 * 100 = 10 | 99.0 * 100 = 9900
> "reduce fall damage" "0.5"
Reflected projectiles become crit - additive
> Reflected projectiles become crit.
> Value = yes or not.
> "reflected projectiles crit" "1"
Multiple buildings - additive
> Multiple buildings. Only Sentry and Dispenser, multiples TPs are useless.
> Value1 = sentry count.
> Value2 = dispenser count.
> Exemple : 10 sentries and 9001 dispenser.
> "mult buildings" "10, 9001"
Mini-crit while airborne (rocket jump) - additive
> Mini-crit while airborne.
> Value = yes or not.
> "mod mini-crit while airborne" "1"
Crit on airborne target - additive
> Crit on airborne target.
> Value = yes or not.
> "mod crit airborne" "1"
Reflect damage - percentage
> Reflect damage.
> Value = multiplier.
> value * damage taken = damage
> Exemple : 0.5 * 65 = 32.5 | 2.0 = 130
Backstab is Infection - additive
> Backstab will infect the victim and kill him after ??? seconds.
> Value = duration.
> Exemple : After 5 seconds, the victim will die.
> "backstab is infection" "5.0"
Metal to damage - percentage
> Metal to damage.
> Value = multiplier.
> value * metal = damage
> Exemple : 0.5 * 200 = 100 | 2.0 * 100 = 200
> "metal to damage" "1.0"
Übercharge to damage - percentage
> Übercharge to damage.
> Value = multiplier.
> value * charge = damage
> Exemple : 0.5 * 50% = 25 | 10.0 * 100% = 1000
> "ubercharge to damage" "1.0"
Fire retardant while disguise - additive
> Can't burn while disguise.
> Value = yes or not.
> "fire retardant disguise" "1"
Fire retardant while cloaked - additive
> Can't burn while cloaked.
> Value = yes or not.
> "fire retardant cloak" "1"
Take less damage from backstab - percentage
> Take less damage from backstab.
> Value = multiplier.
> value * backstab = damage
> Exemple : 0.01 * 6.0 (heavy backstabbed) = 0.06 backstab damage = 18 | 0.5 * 6.0 (scout backstabbed) = 3.0 backstab damage = 900
> "backstab less damage self" "0.5"
Backstab stun - additive
> Backstab only stuns.
> Value = duration.
> Exemple : Backstab stuns for 999 seconds.
> "backstab stun" "999.0"
Backstab does less damage - percentage
> Backstab does less damage.
> Value = multiplier.
> value * backstab = damage
> Exemple : 0.01 * 6.0 (backstab a heavy) = 0.06 backstab damage = 18 | 0.5 * 6.0 (backstab a scout) = 3.0 backstab damage = 900
> "backstab less damage" "0.5"
Cloak removes debuff - additive
> Cloak removes debuff. It removes fire, bleed, jarate, milk, mark for death, etc...
> Value = yes or not.
> "cloak removes debuff"
Projectiles gains speed overtime - additive
> Every 0.1 second, the projectile gains speed.
> Value = speed.
> value + projectile speed (h/u or mph?) = projectile speed gain overtime
> Exemple : ROCKET LAUNCHER : 100 + 1100 = 1200 (h/u) | 5 + 47 = 52 (mph)
> "projectile speed bonus overtime" "100" for H/U or "5" for MPH.
Damage bonus while airborne - percentage
> While airborne, gain bonus damage.
> Value = multiplier.
> value * damage = damage
> Exemple : 0.5 * 90 = 45 | 3.0 * 90 = 270
> "damage bonus while airborne" "2.0"
Damage bonus while on the ground - percentage
> While on the ground, gain bonus damage.
> Value = multiplier.
> value * damage = damage
> Exemple : 0.5 * 90 = 45 | 3.0 * 90 = 270
> "damage bonus while on the ground" "2.0"
On hit knockback in radius - additive
> Hit will make an explosion that knockback everyone around it.
> Value1 = damage.
> Value2 = radius.
> Value3 = push force.
> Exemple : Hit will make an explosion that deals 9001 damages in a 1000 radius with a knockback of 500.
> "on hit knockback in radius" "9001, 1000, 500"
Heal allies in a aoe when the wearer dies - additive
> When the wearer dies, heals allies in a aoe.
> Value1 = heal.
> Value2 = radius.
> Exemple : When you die, you will heal your allies for 300 hp in a 500 radius.
> "heal on death" "300, 500"
Homing projectile - additive
> Homing projectile.
> Value = yes or not.
> "homing projectile" "1"
Invisible while charging (sniper) - percentage
> While scoping, the sniper will be fading (should be totally invisible at ???%). Fading time scale with the value. 10% fast fade, 25% spy fade, 50% slow fade, 100% grandpa fade.
> Value = totally invisible.
> "invis while scoping" "0.25"
Detect spy - additive
> Reveals spy around you.
> Value = radius.
> Exemple : Detect spies in a 9001 radius around you.
> "detect spy" "9001"
Medigun hurts enemies - additive
> Medigun hurts ennemies in a 0.1 second interval.
> Value = damage.
> "medigun hurts" "50"
Sapper explodes on destroy - additive
> Sapper explodes when it destroy a building.
> Value1 = damage.
> Value2 = radius.
> Exemple : When it destroy a building it will deals 500 damage in a 100 radius.
> "sapper explodes on destroy" "500, 100"
Sapper explodes on destroyed - additive
> Sapper explodes when the sapper is destroyed.
> Value1 = damage.
> Value2 = radius.
> Exemple : When it gets destroyed it will deals 250 damage in a 200 radius.
> "sapper explodes on destroy" "250, 200"
If that attribute still works, then that's great news
Oh wow, I never even noticed who posted that post on there.
But yeah, it's true; a number of projectiles fired from a sticky launcher (due to its charge mechanic, most likely) will cause a crash when you fire them. This is also true for certain other weapon types, I believe. However, trying out other projectiles on "standard"-firing weapons, like shotguns, miniguns, and rocket launchers, should be safe from crashes. Projectiles that won't work (due to the weapon's lack of a charge ability) will simply drop at your feet.
Yeah I posted that. I used to help out with high quality weapon images for AW2 before I had a falling out with Mecha. I also experimented with attributes a fair bit.
I've gotta update my list of override projectile type IDs because theres new stuff.