Raised This Month: $ Target: $400
 0% 

Trie for every player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 05-06-2011 , 13:47   Trie for every player
Reply With Quote #1

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(PLUGINVERSIONAUTHOR)
    
    
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(idprint_chat"you can use menu only every 5 minutes")
}

public 
MenuUsedOff(id)
{
    
g_bMenuUsed[id] = false;

reinert is offline
 



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 04:25.


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