Raised This Month: $ Target: $400
 0% 

ExtendTime


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
vansi
Junior Member
Join Date: Dec 2011
Old 12-23-2011 , 07:06   ExtendTime
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "ExtendTime"
#define VERSION "1.0"
#define AUTHOR "VanSi"

new mp_timelimit;
new 
g_pPre;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
mp_timelimit get_cvar_pointer("mp_timelimit");

    
register_clcmd("amx_et""ExtendTime"ADMIN_LEVEL_B);

    
g_pPre register_cvar("amx_pre_et""[KZCN]");
}

public 
ExtendTime(idlevelcid)
{
    if (!
cmd_access(idlevelcid1))
            return 
PLUGIN_CONTINUE;

    new 
arg[32];
    
read_argv(1arg31);
    new 
curlimit get_pcvar_num(mp_timelimit);

    new 
pre[11];
    
get_pcvar_string(g_pPrepre10);
    if (!
curlimit)
    {
        
ColorChat(idGREEN"%s ^1当前服务器时间无限制,无法延时。"pre);
        return 
PLUGIN_HANDLED;
    }
            
    new 
newlimit curlimit str_to_num(arg);
    
set_pcvar_num(mp_timelimitnewlimit);

    new 
name[32];
    
get_user_name(idname31);
    new 
tl get_timeleft();
    
ColorChat(idGREEN"%s ^1管理员^3 %s ^1延长时间^3 %d ^1分钟,当前剩余时间:%d:%02d"prenamestr_to_num(arg), (tl 60), (tl 60));

    return 
PLUGIN_HANDLED;


Last edited by vansi; 02-04-2013 at 15:47.
vansi 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 16:24.


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