AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Bunnyhop Commands (Redux) [1.5 19 February 2013] (https://forums.alliedmods.net/showthread.php?t=204775)

shavit 01-03-2013 09:19

[CS:S] Bunnyhop Commands (Redux) [1.5 19 February 2013]
 
2 Attachment(s)
This is a redux of my old plugin Bunnyhop Commands.


1. Commands:
  • sm_bhop/sm_commands - Show the menu of available commands.
  • sm_guns/sm_weapons - Show the menu of the available weapons.
  • sm_aj/sm_autojump - Change your autojump status. Usage: sm_autojump <1/0>
  • sm_grav/sm_gravity - Show the menu of the gravity changes.

2. Console Variables:
  • sm_bhopredux_version - Plugin version.
  • sm_bhopredux_enabled - Bunnyhop Commands (Redux) is enabled? [1]
  • sm_bhopredux_autojump - Enable auto jumping? [1]
  • sm_bhopredux_weapons - Allow weapon spawning? [1]
  • sm_bhopredux_gravity - Allow gravity changing? [1]
  • sm_bhopredux_falldamage - Disable damaged caused by falling? [1]
  • sm_bhopredux_noti - Notificate the players each time a cvar has been changed? [1]

3. Config:
Config will be auto created/executed in cfg/sourcemod/bhopcommands_redux.cfg.

4. Requirements:
  • The SDKTools extension. (Comes with SourceMod)

5. Planned:
Nothing, request what do you want, but you shouldn't expect it 100% to be added.

6. Feedback:
You can post any feedback in the thread.

7. Bug Reports:
You can report any problem with the plugin via PM or the thread attaching error logs.

8. Update:
Delete the cfg/sourcemod/bhopcommands_redux.cfg file and follow Installation.

9. Installation
Copy bhopcommands.smx to addons/sourcemod/plugins and load the plugin manually, change map or restart the server.

10. Changelog:
1.5 / 19 February 2013 -
Fixed everything that is listed here.

1.4 / 19 February 2013 -

Fixed that the "back" button in menus didn't worked.

1.3 / 19 February 2013 -
Fixed everything that is listed here.

1.2 / 3 January 2013 -
Fixed everything that is here.

1.1 / 3 January 2013 -
Changed plugin status to "Ready for review".
Fixed an possible error.

1.0 / 3 January 2013 - Initial release.

shavit 01-03-2013 10:19

Re: [CS:S] Bunnyhop Commands (Redux) [1.1 3 Jan 2013]
 
Quote:

1.1 / 3 January 2013 -
Changed plugin status to "Ready for review".
Fixed an possible error.

xNos 01-03-2013 11:58

Re: [CS:S] Bunnyhop Commands (Redux) [1.1 3 Jan 2013]
 
wow man that is so makeover for the plugin.

Impact123 01-03-2013 13:38

Re: [CS:S] Bunnyhop Commands (Redux) [1.1 3 Jan 2013]
 
I have found several bugs while quickly looking over the half of your code.

  • AutoExecConfig should be after you have created the convars
  • You re set the convarvariables after AutoExecConfig is done, see next point
  • You should grab the convarvalues after AutoExecConfig is done
  • You should fetch bool convars with GetConvarBool and not with StringToInt and such
  • The notifications when some part is enabled or not should be able to deactivate
  • If you change an byref valie in an Callback you should return Plugin_Changed not Handled
  • You should use sizeof if you can instead of the numerical size of a variable
  • You print out an full timestamp instead of remaining waitingtime in the weaponmenuhandler
Have you tested your code?

Yours sincerely
Impact

shavit 01-03-2013 13:52

Re: [CS:S] Bunnyhop Commands (Redux) [1.1 3 Jan 2013]
 
About the "dissabled"/"ensabled" it's "\x04%sabled" with an %s and not just an s.
Fixed the cvar stuff, and I will continue using the StringToInt.
Changed the handled return to changed.
I don't like using sizeof unless it's a part that is hard to reach/find from the current function that I'm looking at.
Added sm_bhopredux_noti.
And for the best part - fully tested!

shavit 01-03-2013 13:55

Re: [CS:S] Bunnyhop Commands (Redux) [1.2 3 Jan 2013]
 
Quote:

1.2 / 3 January 2013 -
Details here

shavit 01-03-2013 14:18

Re: [CS:S] Bunnyhop Commands (Redux) [1.2 3 Jan 2013]
 
There is an OnCvarChanged public.
The cvar change is called before AutoExecConfig, means that an hook will appear, and a config will be executed.

Root_ 01-04-2013 12:47

Re: [CS:S] Bunnyhop Commands (Redux) [1.2 3 Jan 2013]
 
I hate centered text

shavit 01-04-2013 13:31

Re: [CS:S] Bunnyhop Commands (Redux) [1.2 3 Jan 2013]
 
Quote:

Originally Posted by Root_ (Post 1866971)
I hate centered text

Centered texts hate you.

alongub 02-19-2013 14:44

Re: [CS:S] Bunnyhop Commands (Redux) [1.2 3 Jan 2013]
 
Code:

for(new i; i <= MaxClients; i++)
Initialize i = 1.

Code:

if(!IsValidClient(client, true) || !gB_Enabled || !gB_AutojumpCVar || !gB_Autojump[client] || Client_IsOnLadder(client) || Client_GetWaterLevel(client) > Water_Level:WATER_LEVEL_FEET_IN_WATER)
Make sure that the client is valid before calling Client_IsOnLadder and Client_GetWaterLevel.


All times are GMT -4. The time now is 07:13.

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