//AMXXPC compile.exe
// by the AMX Mod X Dev Team
//// ze_escape_button_detector_no_flood.sma
//
// D:\scripting\ze_escape_button_detector_no_flood.sma(19) : warning 213: tag mismatch
// D:\scripting\ze_escape_button_detector_no_flood.sma(19) : error 035: argument type mismatch (argument 3)
//
// 1 Error.
// Could not locate output file D:\scripting\compiled\ze_escape_button_detector_no_flood.amx (compile failed).
//
// Compilation Time: 0.91 sec
// ----------------------------------------
Press enter to exit ...
Resolved Button button_detector flood stop.
Re: Button button_detector flood stop.
I got error when i compile it:
Try this bro:
https://forums.alliedmods.net/showthread.php?t=280657
When i go home, i'll try to made it.
https://forums.alliedmods.net/showthread.php?t=280657
When i go home, i'll try to made it.
Try this:
Code: Select all
#include <zombie_escape>
#include <amxmisc>
new not_allow
public plugin_init ()
{
register_plugin("[ZE] Escape Button Detector", "1.1", "Raheem")
RegisterHam(Ham_Use, "func_button", "Fw_ButtonUsed_Post", 1)
}
public Fw_ButtonUsed_Post(iEnt, iCallerID)
{
new szTargetName[51]; get_entvar(iEnt, var_target, szTargetName, charsmax(szTargetName))
new szCallerName[32]; get_user_name(iCallerID, szCallerName, charsmax(szCallerName))
if(!not_allow)
{
// Player Pressed button is Human?
if (!ze_is_user_zombie(iCallerID))
{
for(new id = 1; id <= get_member_game(m_nMaxPlayers); id++)
{
if (is_user_admin(id))
{
ze_colored_print(id, "!tButton pressed by!y: !g%s", szCallerName)
not_allow = true
set_task(5.0, "allow")
}
}
}
}
}
public allow(id)
{
not_allow = false
}
- Raheem
- Mod Developer
- Posts: 2124
- Joined: 3 Years Ago
- Location: Egypt
- Has thanked: 44 times
- Been thanked: 131 times
- Age: 23
- Contact:
OK, Here it's:
Code: Select all
#include <zombie_escape> #include <amxmisc> // Variables new Float:g_flLastUsed[33] // Cvars new pCvarFloodTime public plugin_init () { register_plugin("[ZE] Admin Button Message", "1.1", "Raheem") // Hams RegisterHam(Ham_Use, "func_button", "Fw_ButtonUsed_Post", 1) // Cvar pCvarFloodTime = register_cvar("ze_button_message_flood_time", "0.5") } public Fw_ButtonUsed_Post(iEnt, iCallerID) { new szTargetName[51]; get_entvar(iEnt, var_target, szTargetName, charsmax(szTargetName)) new szCallerName[32]; get_user_name(iCallerID, szCallerName, charsmax(szCallerName)) // Player Pressed button is Human? if (!ze_is_user_zombie(iCallerID)) { for(new id = 1; id <= get_member_game(m_nMaxPlayers); id++) { if (is_user_admin(id)) { if ((get_gametime() - g_flLastUsed[iCallerID]) > get_pcvar_float(pCvarFloodTime)) { ze_colored_print(id, "!tButton pressed by!y: !g%s", szCallerName) g_flLastUsed[iCallerID] = get_gametime() } } } } }
ze_button_message_flood_time 0.5
can take any value (Integer or Float) examples: 0.001 - 0.01 - 0.1 - 5 .. etc
Last edited by Raheem on 27 Jan 2018, 16:17, edited 1 time in total.
Reason: FIXED
Reason: FIXED
Who is online
Users browsing this forum: No registered users and 8 guests