[TF2] Help changing sniper attributes
Well hello!
Going back to plugins utilisation after a 2 year long wait, I noticed one of the tInstagib plugin (https://forum.alliedmods.net/showtread.php?p=1606838) module i used to run a "Rifle Only" dedicated server is not working anymore: The plugin module (tIg.forceweapon.sp) removes all weapons from every player (they all have yet been forced to choose Sniper class) and give them back only the sniper after updating some attributes to make them shoot tracers and be ammo'd with 200 rounds. Everything works good except everyone's sniper weapon can't be seen by other players! I spontaneously blame the "give weapon" functionality and am looking for some workaround so everyone's sniper would shoot tracers and have a 200 round magazine. For example, could it be posssible to update the sniper before it equips the players or update every sniper once the player is effectively equipped with it, without remove+give? *I will be happy even if you just tell me yes or no :) |
Re: [TF2] Help changing sniper attributes
Quote:
|
Re: [TF2] Help changing sniper attributes
Quote:
And what if we talk about weapon attrubutes updating, is it a taboo subject too? |
Re: [TF2] Help changing sniper attributes
Quote:
|
Re: [TF2] Help changing sniper attributes
Thanks for your reply Nursik. By updating i meant only change attributes of the player current weapon, without having to create a sniper with custom attribute values and then removing the current weapon and then giving the new one to the player. In other words, can we change the attributes once the weapon has been given to the player?
I would like to workaround these functions, as they produce the bad result i faultly mentioned above :oops: Code:
public Action:Timer_CheckInventory(Handle:timer, any:iClient) { |
Re: [TF2] Help changing sniper attributes
ok i got what i want using tf2Items :)
But still eager to know if it's possible to access attributes of a player current weapon. |
Re: [TF2] Help changing sniper attributes
If you give them the stock weapons (like the sniper rifle), they're usually visible.
Keep in mind that Stock weapons usually have a level of 1 and a quality of... 0 I think. |
Re: [TF2] Help changing sniper attributes
just use the machina attributes?
|
Re: [TF2] Help changing sniper attributes
If you want to have the weapons visible, you should let them their sniper, use tf2attributes and strip all the attributes from their sniper, giving you a stock sniper to work from. And then reuse tf2attributes, to apply the attributes you want.
And you should also add a check for the class name "tf_weapon_sniperrifle_classic" and "tf_weapon_compound_bow", and then give them a stock sniper and change their attributes. (Only those players will have an invisible sniper) |
Re: [TF2] Help changing sniper attributes
Thank you so much for your consistent answers!
Quote:
In the meanwhile, it's going good too with your weapon restriction plugin + a tf2items.weapons.txt to add the wanted sniper attribute values. Thanks for the method Benoist, that was the way i imagined to do it initially but didn't have yet someone to point me to the fundamental basics ! Wonder if you have some smart process behind your head fiagram :) |
All times are GMT -4. The time now is 18:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.