Raised This Month: $32 Target: $400
 8% 

[Request] Limit slap/slay


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tom1kIG
Junior Member
Join Date: May 2021
Old 06-01-2021 , 10:47   [Request] Limit slap/slay
Reply With Quote #1

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

Last edited by tom1kIG; 06-01-2021 at 10:50.
tom1kIG is offline
tom1kIG
Junior Member
Join Date: May 2021
Old 06-13-2021 , 05:34   Re: [Request] Limit slap/slay
Reply With Quote #2

Still looking!
tom1kIG is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-13-2021 , 17:25   Re: [Request] Limit slap/slay
Reply With Quote #3

What plugin are you using that implements the slay/slap functions? Also, what version? We need to know what plugin to modify.
__________________
fysiks is offline
tom1kIG
Junior Member
Join Date: May 2021
Old 06-17-2021 , 03:33   Re: [Request] Limit slap/slay
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
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

Last edited by tom1kIG; 06-17-2021 at 03:39.
tom1kIG is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-17-2021 , 23:23   Re: [Request] Limit slap/slay
Reply With Quote #5

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.
Attached Files
File Type: sma Get Plugin or Get Source (admincmd.sma - 81 views - 35.9 KB)
__________________

Last edited by fysiks; 06-17-2021 at 23:25.
fysiks is offline
tom1kIG
Junior Member
Join Date: May 2021
Old 06-18-2021 , 11:31   Re: [Request] Limit slap/slay
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
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

Last edited by tom1kIG; 06-18-2021 at 16:34.
tom1kIG is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-18-2021 , 20:38   Re: [Request] Limit slap/slay
Reply With Quote #7

Quote:
Originally Posted by tom1kIG View Post
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 View Post
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 View Post
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 View Post
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.
__________________

Last edited by fysiks; 06-18-2021 at 20:39.
fysiks is offline
tom1kIG
Junior Member
Join Date: May 2021
Old 06-19-2021 , 11:05   Re: [Request] Limit slap/slay
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
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
tom1kIG is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-19-2021 , 14:05   Re: [Request] Limit slap/slay
Reply With Quote #9

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)?
__________________
fysiks is offline
tom1kIG
Junior Member
Join Date: May 2021
Old 06-20-2021 , 03:03   Re: [Request] Limit slap/slay
Reply With Quote #10

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.
tom1kIG 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 13:01.


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