Raised This Month: $ Target: $400
 0% 

CountDown...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-04-2012 , 19:21   Re: CountDown...
Reply With Quote #3

I hope this helps you.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Count down timer"
#define VERSION "1.0"
#define AUTHOR "Bilal"

#define TASKID 1996

new Timer

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /cd""CmdMenu")
}

public 
CmdMenu(id)
{
    new 
menu menu_create("\rCountdown Menu!""MainMenuHandler"0)
    
    
menu_additem(menu"Timer \d#5""1")
    
menu_additem(menu"Timer \d#10""2")
    
menu_additem(menu"Timer \d#15""3")
    
menu_additem(menu"Timer \d#60""4")
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
}

public 
MainMenuHandler(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64], accescallback
    menu_item_getinfo
(menuitemaccesdatacharsmax(data), namecharsmax(name), callback)
    new 
key str_to_num(data)
    
    switch (
key)
    {
        case 
1Timer 5
            
case 2Timer 10
            
case 3Timer 15
            
case 4Timer 60
        
}
    
Countdown(id)
    return 
PLUGIN_HANDLED
}

public 
Countdown(id)
{
    if(
task_exists(TASKID))
        
remove_task(TASKID)

    
set_task(1.0"Countdown2"TASKID__"a"Timer)
}

public 
Countdown2(id
{
    if (
Timer == 1
    {
        
set_hudmessage(02550, -1.00.4001.01.00.11.02)
        
show_hudmessage(0"Time is up!"
    }
    else 
    {
        
set_hudmessage(02550, -1.00.3001.01.00.11.01)
        
show_hudmessage(0"Timer: %i"Timer--)
    }
    return 
PLUGIN_CONTINUE

__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro 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 00:23.


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