Raised This Month: $94 Target: $400
 23% 

TS RoF Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   The Specialists        Category:   Fun Stuff        Approver:   Hawk552 (427)
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-05-2006 , 23:57   TS RoF Mod
Reply With Quote #1

TS RoF Mod allows you to use every rate of fire for every weapon. Use the same button you always did (a key bound to "firemode"), just cycle through more choices. Yes, this means burst fire Raging Bull, full auto Akimbo Socom 23, etcetera, etcetera.

The only cvar is tsrof_enabled (default 1), which controls the use of this plugin.

This plugin requires the fakemeta and tsx/tsfun module to run. If you want to compile it yourself, you will need my TS weapon function stock library, otherwise I have attached a compiled .amxx file for the latest version of AMXx.

Note the following exceptions to RoF:
  • Non-akimbo weapons can not use Free Semi or Free Full (if you tried, they would function exactly as Semi-Auto or Full-Auto).
  • Pump-action shotguns (Benelli M3, SPAS-12, and Mossberg 500) can not use burst fire (if you tried, they wouldn't shoot at all).
  • Weapons that aren't pump-action shotguns can not use Pump-Action (if you tried, they would fire exactly like Full-Auto).
  • Weapons that don't even have a ROF (grenades, knives, katanas, etcetera) can not change ROF, obviously

This has only been tested on a Windows 32-bit server. This will not work on a Windows 64-bit server. This has not been tested on a Linux server, but may still work. If you run a Linux TS server, please try this plugin and let me know if it works for you.
Attached Files
File Type: sma Get Plugin or Get Source (ts_rof.sma - 1106 views - 2.6 KB)
File Type: amxx ts_rof.amxx (8.6 KB, 377 views)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 11-07-2006 at 17:20.
XxAvalanchexX is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 11-06-2006 , 00:28   Re: TS RoF Mod
Reply With Quote #2

Very clever use of your newly created function.
I didn't know this was actually possible.
stupok is offline
Old 11-06-2006, 02:18
XxAvalanchexX
This message has been deleted by XxAvalanchexX.
Old 11-06-2006, 09:52
Lord_Destros
This message has been deleted by Lord_Destros.
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-06-2006 , 20:58   Re: TS RoF Mod
Reply With Quote #3

Fixed a bug that would cause an array out of bounds error when using the seal knife.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 11-06-2006 , 23:47   Re: TS RoF Mod
Reply With Quote #4

I'm using the latest ts_rof.sma with version V of the ava_ts.inc, and here's the error I got:

Code:
L 11/06/2006 - 21:56:12: [AMXX] Displaying debug trace (plugin "ts_rof.amxx")
L 11/06/2006 - 21:56:12: [AMXX] Run time error 4: index out of bounds
L 11/06/2006 - 21:56:12: [AMXX]    [0] ts_rof.sma::cmd_firemode (line 61)
stupok is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-07-2006 , 00:16   Re: TS RoF Mod
Reply With Quote #5

Were you using kungfu when you hit the firemode button? Anyway, the latest version should work.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 11-07-2006 , 00:20   Re: TS RoF Mod
Reply With Quote #6

Unfortunately I can't tell you what happened in the game when the error occurred, it was caused by one of the clients on my server. I'll look into it myself later.
stupok is offline
mini_sodier
Member
Join Date: Sep 2006
Location: Your moms bed
Old 11-07-2006 , 19:39   Re: TS RoF Mod
Reply With Quote #7

I like this it will be useful in zombie dms
__________________



mini_sodier is offline
Send a message via AIM to mini_sodier Send a message via MSN to mini_sodier
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-26-2006 , 14:51   Re: TS RoF Mod
Reply With Quote #8

I don't think there's anything to be said here.

Approved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
stupok
Veteran Member
Join Date: Feb 2006
Old 12-26-2006 , 16:38   Re: TS RoF Mod
Reply With Quote #9

This bit of code will prevent the error that I got when someone tries to change the rate of fire of Kung Fu.

Code:
// change ROF  public cmd_firemode(id)  {     if(!get_pcvar_num(cvEnabled))         return PLUGIN_CONTINUE;     // get current stats     new currweapon, currmode, dummy;     currweapon = ts_getuserwpn(id,dummy,dummy,currmode,dummy);         //The line below will prevent the error.     if(currweapon == TSW_KUNG_FU) return PLUGIN_HANDLED     new nextROF = get_next_firemode(currweapon,(rof[id][currweapon] == -1) ? currmode : rof[id][currweapon]);         // set new rof     ts_set_weapon_rof(id,currweapon,nextROF,0);     rof[id][currweapon] = nextROF;     // block original request     return PLUGIN_HANDLED;  }
stupok is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-26-2006 , 17:49   Re: TS RoF Mod
Reply With Quote #10

TSW_KUNG_FU = 36. I already have it stop if the weapon is more than 35.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply


Thread Tools
Display Modes

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 23:10.


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