Raised This Month: $51 Target: $400
 12% 

[TF2] Melee Only


Post New Thread Reply   
 
Thread Tools Display Modes
jameless
Veteran Member
Join Date: Jan 2010
Old 12-03-2010 , 06:46   Re: [TF2] Melee Only
Reply With Quote #81

Votemelee won't turn melee off.

Also an admin in an attempt to turn off melee only typed sm_melee in console and it crashed the server. We don't run any other melee plugins so can anyone else try this and let me know if it's this plugin?

Other than that this is the best melee plugin we've used. Thanks!
jameless is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 12-06-2010 , 01:10   Re: [TF2] Melee Only
Reply With Quote #82

Somebody test this out. Melee vote toggles melee mode, not just turns it on.
melee_class accepts sniper scout demo engy spy heavy medic soldier pyro, or just ""
melee_classmode accepts 0 for don't force class, 1 for force on sudden death, 2 for force whenever melee is on

I have not tested this, I don't know if I did it right, so... blah.
Good luck.
Attached Files
File Type: smx melee.smx (11.4 KB, 90 views)
File Type: sp Get Plugin or Get Source (melee.sp - 278 views - 17.6 KB)
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 12-06-2010 at 01:17.
FlaminSarge is offline
blik
Senior Member
Join Date: May 2006
Old 12-07-2010 , 05:22   Re: [TF2] Melee Only
Reply With Quote #83

Nice FlaminSarge, would it be possible to have it choose a class at random that everyone will spawn as?
blik is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 12-08-2010 , 13:32   Re: [TF2] Melee Only
Reply With Quote #84

Alright, big update, I improved the efficiency of the plugin so I would recommend that everyone update.

Changelog for 0.2.6:

  • Added the ability to force a class during melee sudden death, new convar is melee_suddendeath_class.
  • Improved efficiency during melee mode.
  • Changed melee vote to toggle instead of being one-way.
  • Fixed a bug with the spy's sapper slot being skipped during melee mode in other mods (randomizer).
  • Changed some of the wording in player messages.
I tried to hit on some of the suggestions. Let me know if you have any problems, this update was fairly big.
__________________
pheadxdll is offline
Biofreak
New Member
Join Date: Nov 2010
Old 12-11-2010 , 04:59   Re: [TF2] Melee Only
Reply With Quote #85

This is already really good.
But can you also make it possible to force people to a class outside of melee suddendeath?
Biofreak is offline
o0whiplash0o
Member
Join Date: Jun 2010
Old 12-11-2010 , 23:15   Re: [TF2] Melee Only
Reply With Quote #86

Someone check something for me: can you still use your minigun if melee mode is enabled while it's spinning?
o0whiplash0o is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 12-12-2010 , 01:35   Re: [TF2] Melee Only
Reply With Quote #87

Quote:
Originally Posted by o0whiplash0o View Post
Someone check something for me: can you still use your minigun if melee mode is enabled while it's spinning?
Just tried and it didn't reset the weapon. Thanks for finding this, I'll try and fix it.
__________________
pheadxdll is offline
o0whiplash0o
Member
Join Date: Jun 2010
Old 12-12-2010 , 09:44   Re: [TF2] Melee Only
Reply With Quote #88

Quote:
Originally Posted by pheadxdll View Post
Just tried and it didn't reset the weapon. Thanks for finding this, I'll try and fix it.
Thank the jerk on my server who exploited this XD

EDIT: When you do fix it, could you post the relevant changes here? I'm running a fairly modified version of your plugin with a few map-specific changes.

Last edited by o0whiplash0o; 12-12-2010 at 12:47. Reason: everyone else was doing i just wanted to be popular
o0whiplash0o is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 12-13-2010 , 13:19   Re: [TF2] Melee Only
Reply With Quote #89

Finally fixed that glitch, Valve does things in strange ways. The only way to switch the weapon is to change the m_iWeaponState of the minigun. I didn't touch melee.txt so that can stay the same. Find any other glitches let me know.

I added Natives in this next version. I removed the sudden death code and moved it to its own plugin. Whiplash, check out that plugin and see if you can use those natives so you don't have to continue to edit my plugin. If it's not possible, can you suggest some changes I could make so it is possible?

Changelog for 0.2.7:
  • Added natives in melee.inc: SetMeleeMode and GetMeleeMode.
  • Removed sudden death code and moved it to a seperate plugin.
  • Fixed a glitch dealing only with the minigun.
__________________

Last edited by pheadxdll; 12-13-2010 at 13:38.
pheadxdll is offline
o0whiplash0o
Member
Join Date: Jun 2010
Old 12-13-2010 , 14:51   Re: [TF2] Melee Only
Reply With Quote #90

Your fix works! By the way, if you were wondering, the thing I modified was I added a simple position check to the SetActiveWeapon() function:
Code:
SetActiveWeapon(client, weapon) {     if(InBounds(client)) {         new iWeapon = GetActiveWeapon(client);         new iSlot3 = GetPlayerWeaponSlot(client, 2);                 decl String:strClass[40];         GetEdictClassname(iWeapon, strClass, sizeof(strClass));                 if((strcmp(strClass, "tf_weapon_minigun") == 0)&(InBounds(client)))         {             ResetMinigun(iWeapon, 0);             TF2_RemoveCondition(client, TFCond_Slowed);         }         SDKCall(g_hWeaponSwitch, client, weapon, 0);     } } InBounds(client){//custom, added by whiplash     decl Float:pos[3];     GetClientAbsOrigin(client, pos);     if(((pos[0]<maxX)&(pos[1]<maxY)&(pos[2]<maxZ))&((pos[0]>minX)&(pos[1]>minY)&(pos[2]>minZ))) return true;     else return false; }
The bounds are hard-coded as #defines since I only intend to run one specific map on my trade server. I also forced all ubers to 0%, blocked madmilk/jarate/crit-a-cola/bonk/buff banner/batallion's backup (set bAllow to false for each), and gave anyone outside the bounds buddha mode and access to all weapons. But thanks for doing the hard work for me!

Last edited by o0whiplash0o; 12-13-2010 at 14:55.
o0whiplash0o is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode