You tested my code?
Button button_detector flood stop.
For this i tested it and it's working without any problem. Just make sure to change the cvar to any value you need as it's 0.5 sec so maybe you don't see the cvar: http://escapers-zone.net/viewtopic.php?p=5473#p5473
He who fails to plan is planning to fail
- sam_bhosale4
- Mod Tester
- Posts: 109
- Joined: 7 years ago
- Location: INDIA
- Contact:
I guess hes talking about my plugin Press Button Info not escape button!
Because even i get flood by this button people spams too much!
plugin needs no flood delay..
Because even i get flood by this button people spams too much!
plugin needs no flood delay..
About this,, you can use this edited plugin, ofcourse thanks to [mention]Raheem[/mention]sam_bhosale4 wrote: ↑6 years ago I guess hes talking about my plugin Press Button Info not escape button!
Because even i get flood by this button people spams too much!
plugin needs no flood delay..
Code: Select all
#include <zombie_escape>
#include <amxmisc>
#define PLUGIN "Cooldown type command"
#define VERSION "1.0"
#define AUTHOR "Freeman"
#define MAX_PLAYERS 32
new CvarCooldown
new Float:CommandNextTime[MAX_PLAYERS+1]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
CvarCooldown = register_cvar("amx_cmd_cooldown", "60")
RegisterHam(Ham_Use, "func_button", "Fw_ButtonUsed_Post", 1)
}
public Fw_ButtonUsed_Post(iEnt, id)
{
new Float:gametime = get_gametime()
new Float:command_next_time = CommandNextTime[id]
if( gametime < command_next_time )
{
//new Float:timeleft = command_next_time - gametime
//client_print(id, print_chat, "You must wait %.0f second%s to use this command", timeleft, (1.0 <= timeleft < 2.0) ? "s" : "")
return
}
CommandNextTime[id] = gametime + get_pcvar_float(CvarCooldown) - 55
new szTargetName[51]; get_entvar(iEnt, var_target, szTargetName, charsmax(szTargetName))
new szCallerName[32]; get_user_name(id, szCallerName, charsmax(szCallerName))
// Player Pressed button is Human?
if (!ze_is_user_zombie(id))
{
ze_colored_print(0, "!tButton pressed by!y: !g%s", szCallerName)
}
}
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: xxGamerxx and 3 guests