AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [Request] Limit slap/slay (https://forums.alliedmods.net/showthread.php?t=332788)

tom1kIG 06-01-2021 10:47

[Request] Limit slap/slay
 
Hello,
I am looking for a plugin that can limit the Slay and Slap, let's say i slay somebody i want to be able to slay again/slap in 5 minutes, example
ADMIN blabla slay Player
I want to try to slay somebody else and to get a message:
[Anti-Slay] You have to wait X (5) minutes before you can slay again. (If possible with colors)
And this only to work with admins who have flag "q" , whoever admin doesn't have Q to be able to slay/slap whenever he wants

tom1kIG 06-13-2021 05:34

Re: [Request] Limit slap/slay
 
Still looking!

fysiks 06-13-2021 17:25

Re: [Request] Limit slap/slay
 
What plugin are you using that implements the slay/slap functions? Also, what version? We need to know what plugin to modify.

tom1kIG 06-17-2021 03:33

Re: [Request] Limit slap/slay
 
Quote:

Originally Posted by fysiks (Post 2749651)
What plugin are you using that implements the slay/slap functions? Also, what version? We need to know what plugin to modify.

The normal admincmd - 1.10

fysiks 06-17-2021 23:23

Re: [Request] Limit slap/slay
 
1 Attachment(s)
I wasn't sure if you wanted to have the two commands to start the same timer functionality so that is what I did. Also, these commands don't print anything to chat (they are console commands) so color chat doesn't make sense. I also don't ever use color chat myself so I rarely implement it since I can't compile it.

You can change the time and the flag used by changing the values assigned to SlaySlapTime_minutes and ADMIN_SLAYSLAP_LIMIT_FLAG, respectively.

tom1kIG 06-18-2021 11:31

Re: [Request] Limit slap/slay
 
Quote:

Originally Posted by fysiks (Post 2750226)
I wasn't sure if you wanted to have the two commands to start the same timer functionality so that is what I did. Also, these commands don't print anything to chat (they are console commands) so color chat doesn't make sense. I also don't ever use color chat myself so I rarely implement it since I can't compile it.

You can change the time and the flag used by changing the values assigned to SlaySlapTime_minutes and ADMIN_SLAYSLAP_LIMIT_FLAG, respectively.

Thanks i will try it now! So basically "SlaySlapTime_minutes" that's the amount of mintues to not be able to slay, and ADMIN_SLAYSLAP_LIMIT_FLAG here i need to put the flags that shouldn't be able to slay before the time?
EDIT: I tested it, works but only for 1 player. For example i slay "Player" and if i try to slay him again i can't. But i can slay somebody else, i want to be able to use Slay/Slap only 1 time per X amount on all people, not just 1. Thanks
EDIT 2: Can u make exception like i have full access but i need to wait the minutes as well for the slay. If possible players with flag A to be able to slay whenever they want

fysiks 06-18-2021 20:38

Re: [Request] Limit slap/slay
 
Quote:

Originally Posted by tom1kIG (Post 2750304)
So basically "SlaySlapTime_minutes" that's the amount of mintues to not be able to slay

or slap. Both amx_slay and amx_slap will restart the counter meaning that you can't use either amx_slay or amx_slap for 5 minutes. If you want, I can make it so that each command has their own counters.

Quote:

Originally Posted by tom1kIG (Post 2750304)
ADMIN_SLAYSLAP_LIMIT_FLAG here i need to put the flags that shouldn't be able to slay before the time?

No, if a player has this flag then they are required to wait 5 minutes between uses of amx_slay or amx_slap. The flag that I have it set to is flag "q" as you requested.

Quote:

Originally Posted by tom1kIG (Post 2750304)
EDIT: I tested it, works but only for 1 player. For example i slay "Player" and if i try to slay him again i can't. But i can slay somebody else, i want to be able to use Slay/Slap only 1 time per X amount on all people, not just 1.

That is not possible with my code. There are no checks for the player being slapped/slayed, it only checks for the person using the amx_slay or amx_slap commands.

Quote:

Originally Posted by tom1kIG (Post 2750304)
EDIT 2: Can u make exception like i have full access but i need to wait the minutes as well for the slay. If possible players with flag A to be able to slay whenever they want

Your original request was that this delay be added for only admins with flag "q". So, if you don't have flag "q" then you will be able to slay/slap as often as you like.

tom1kIG 06-19-2021 11:05

Re: [Request] Limit slap/slay
 
Quote:

Originally Posted by fysiks (Post 2750349)
or slap. Both amx_slay and amx_slap will restart the counter meaning that you can't use either amx_slay or amx_slap for 5 minutes. If you want, I can make it so that each command has their own counters.



No, if a player has this flag then they are required to wait 5 minutes between uses of amx_slay or amx_slap. The flag that I have it set to is flag "q" as you requested.



That is not possible with my code. There are no checks for the player being slapped/slayed, it only checks for the person using the amx_slay or amx_slap commands.



Your original request was that this delay be added for only admins with flag "q". So, if you don't have flag "q" then you will be able to slay/slap as often as you like.

Ok thanks for the info. So can u add the checks please? Also the message that it sents to the chat, everybody see it, not only the person that tried to slap/slay

fysiks 06-19-2021 14:05

Re: [Request] Limit slap/slay
 
I don't think you're actually using the plugin that I posted because you keep saying that it does things that it doesn't do. For example, the amx_slay and amx_slap commands do not print anything to chat. It's really confusing.

Can you maybe re-explain what you are actually requesting? You'll need to be very precise and giving a couple examples would be helpful.

Also, you are using amx_slay and amx_slap correct? Or are you using the menu (which is in an entirely different plugin)?

tom1kIG 06-20-2021 03:03

Re: [Request] Limit slap/slay
 
I am using a plugin that when u press N u get few menus, so instead of writing in console amx_slapmenu u can press N then a button to bring that menu. So basically when they open the amx_slapmenu, i want only 1 slay per 15min. And by that i mean just 1 slay to only player, so lets say i go to amx_slapmenu and slay somebody, if i try to slay somebody else to get the message [Anti-Slay] You have to wait X (5) minutes before you can slay again. After the X amount of time to be able to slay again one more player.

fysiks 06-20-2021 18:30

Re: [Request] Limit slap/slay
 
2 Attachment(s)
Ok, since your various posts have been confusing, here are versions based solely on this latest post. amx_slay in in admincmd.sma has its own time limit and the slay command in the menu in plmenu.sma has its own time limit.


All times are GMT -4. The time now is 11:32.

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