Raised This Month: $ Target: $400
 0% 

amxx timer start and end message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 06-19-2012 , 04:50   amxx timer start and end message
Reply With Quote #1

Hello

This plugins is does no work.
To run this plugin, what should I do?

PHP Code:
#include <amxmodx>
#include <colorchat>
#include <hamsandwich>
#include <fakemeta>

new Trie:g_tStarts
new Trie:g_tStops

new amxx_timer_prefix

public plugin_init()
{
    
amxx_timer_prefix register_cvar("amxx_timer_prefix""")

    
RegisterHam(Ham_Use"func_button""function_button"0)

    
g_tStarts TrieCreate()
    
g_tStops  TrieCreate()
}

public 
function_button(entid)
{
    new 
szTarget[32]
    
pev(entpev_targetszTarget31)

    if(
TrieKeyExists(g_tStartsszTarget))
    {
        
start_timer(id)
    }
    if(
TrieKeyExists(g_tStopsszTarget))
    {
        
end_timer(id)
    }
}

public 
start_timer(id)
{
    new 
prefix[128]
    
get_pcvar_string(amxx_timer_prefixprefix127)
    
ColorChat(idGREEN"[%s] Timer has start"prefix)
}

public 
end_timer(id)
{
    new 
prefix[128]
    
get_pcvar_string(amxx_timer_prefixprefix127)
    
ColorChat(idGREEN"[%s] Timer has end"prefix)

RuRuRu612754 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-19-2012 , 05:19   Re: amxx timer start and end message
Reply With Quote #2

Define "does no work"

Where do you create the key in the Trie?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Reply



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 06:07.


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