On Sunday 26 November 2006 1:25 am, milchworld wrote:
> not only 4. you should be able to buy a weapon for every of your teammates.
> lets say you play 7on7, and only you made frags in the first round. you
> should be able to buy weapons for all 7 in your team...
I have no experience with server plugins, and I'm not even sure how plugins
hook into the mod. But here's my two cents:
Keep an counter on each player, initialized to zero. Keep a field on each
dropped weapon, indicating the player which dropped it. Every time a player
drops a weapon, "tag" the weapon and increment the player's counter. Every
time another player picks up a weapon, "untag" the weapon and decrement
the "dropper" player's counter. Limit the player's counter, to, say, 8.
After 8 dropped weapons, the player cannot drop any more until another player
picks up one of them.
This should have the benefit of:
1. Only running code on weapon drop/pickup, which is (relatively speaking)
a "rare" event, thus not overloading the server.
2. Allowing the player, if for some reason he wants to, drop all his weapons
and more.
3. Allow the player to buy weapons for his teammates, unlimited.
4. Stopping the weapon-spamming fuckers cold.
-John Sheu
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux