SmileYzn / RePugMod

Counter-Strike 1.6 Pickup Game Play for ReGameDLL_CS
MIT License
27 stars 6 forks source link

[Feature Request] Anti-crouch/scroll cvar #6

Closed axl303 closed 1 year ago

axl303 commented 2 years ago

Hello,

It will be much useful to add anti-crouch cvar, only to allow double duck (dd) Like mp_unduck_method 1 cvar by RegameDLL, but to allow doubleduck.

Example AMXX (REAPI) : https://dev-cs.ru/threads/5844/#post-55776 RG_CBasePlayer_Duck is the HOOK I think.

The method is also known as: crouch, russian walk, silent walk, mwheelup + duck

Thank you for your work and time. :)

SmileYzn commented 2 years ago

I did not understand, did you want to allow double duck in server?

mp_unduck_method 0 // Allow mp_unduck_method 1 // Block

The ReGameDLL_CS already has a cvar for it

axl303 commented 2 years ago

I mean to disable crouching, also known as Silent run, but to be able to do DD(Double duck)

What is crouching/silent run? https://www.youtube.com/watch?v=GRhXiH59osU - the video explains difference between DD(Double Duck) and Crouching/Silent run. Also I gave you an example with amxx plugin (based on reapi) Here is a pastebin of the amxx plugin - https://pastebin.com/LWAWSCzW

Mainly in 5v5/CW servers or public pugs/mixes etc.. People dislike crouching/silent run and in some tournaments it was not allowed to crouch/silent run.

Thank you for the answer and your time.

SmileYzn commented 2 years ago

I can made other metamod plugin to fix that, or you just intall a clean amxmodx (Only with anti crouching plugin)

To be honest, this is more a gameplay fix than a pug feature.

I will try to insert this on pugmod to see results

EDIT: I understand the difference, but to block silent run you need to block also double duck.

axl303 commented 2 years ago

I totally agree with you that this is more a gameplay fix, but valve doesn't care, so we gotta figure it ourselves.

If possible and if you have time to make one metamod plugin as a addition to the repugmod will be awesome. So guys like me to use it.

With the amxx plugin, double duck is working l, but silent run is blocked.

Anyways, sorry for taking some of your time. Thank you for the work on repugmod.

SmileYzn commented 2 years ago

With the amx plugin, double duck is working l, but silent run is blocked.

That was my doubt, if will work as expected. Also need to check when mp_unduck_method to enable / disable silent run block.

And add more one cvar to enable silent run checker.

axl303 commented 2 years ago

Okay I registered a hook g_ReGameHookchains->CBasePlayer_Duck()->registerHook(ReGameDLL_CBasePlayer_Duck); And I did a void function void ReGameDLL_CBasePlayer_Duck(IReGameHook_CBasePlayer_Duck chain, CBasePlayer){}

But I don't know how to transfer the rest code: Like:
new button = get_entvar(id, EntVars:var_button); // get_user_button(id) new oldbutton = get_entvar(id, EntVars:var_oldbuttons); // get_user_oldbutton(id) Should they be: int button = ... ?

I need some help to transform the code from amxx to metamod Pastebin code: https://pastebin.com/LWAWSCzW

Can I send you a mail for some help or if you can explain me how to transfer some things from amxx to metamod. Thank you

SmileYzn commented 1 year ago

ReGameDLL_CS already have mp_unduck_method integrated no?