Hey, I would like to create a bool, that will be saved for every player, arrays should be reseted on new map.
I need to make a bool, like:
new bool:g_MenuUsed[64];
then when player uses a menu it will be set to true, and then set a task that after 300 seconds will set it again to true, but I want to avoid cheating via reconnects so I've to use trie's, yeah? and how can I do it ?
I've like:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Plugin name"
#define VERSION "1.0"
#define AUTHOR "author"
new bool:g_bMenuUsed[64];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /menu", "CmdMenu")
}
public CmdMenu(id)
{
if(!g_bMenuUsed[id])
{
g_bMenuUsed[id] = true;
//ShowMenu(id)
set_task(300.0, "MenuUsedOff", id)
}
client_print(id, print_chat, "you can use menu only every 5 minutes")
}
public MenuUsedOff(id)
{
g_bMenuUsed[id] = false;
}