Raised This Month: $51 Target: $400
 12% 

[Req] Info plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Giass
Member
Join Date: Aug 2011
Location: {Israel}
Old 02-05-2016 , 16:43   [Req] Info plugin
Reply With Quote #1


hello, i saw this plugin, can anyone give me this plugin?
__________________
All you need is carb
Giass is offline
JoaoVieira
Senior Member
Join Date: May 2013
Location: Portugal
Old 02-05-2016 , 17:57   Re: [Req] Info plugin
Reply With Quote #2

Quote:
Originally Posted by Giass View Post

hello, i saw this plugin, can anyone give me this plugin?
There is a thing called google did you knew it?
btw
i found this
PHP Code:
#include <amxmodx>
//#include <time>

#define UPDATE_INTERVAL 1.0
#define HUD_TIME 1.1

new gCvarColor;
new 
gCvarPosX;
new 
gCvarPosY;

public 
plugin_init() {
    
register_plugin("Server Info Display""0.0.2""Exolent");
    
    
//register_dictionary("time.txt");
    //register_dictionary("timeleft.txt");
    
    
gCvarColor register_cvar("serverinfo_color""0,255,0");
    
gCvarPosX register_cvar("serverinfo_pos_x""-0.1");
    
gCvarPosY register_cvar("serverinfo_pos_y""0.1");
    
    
set_task(UPDATE_INTERVAL"TaskDisplayInfo", .flags "b");
}

public 
TaskDisplayInfo() {
    new 
timeString[32], dateString[32];
    
get_time("%I:%M:%S %p"timeStringcharsmax(timeString));  
    
get_time("%m/%d/%Y"dateStringcharsmax(dateString));
    
    new 
timeLeft[64], timeLeftLen;
    new 
timeLeftSeconds get_timeleft();
    
    new const 
timeUnitNames[][] = {"week""day""hr""minute""second"};  
    new const 
timeUnitsToSeconds[sizeof(timeUnitNames)] = {604800864003600601};
    new 
timeUnitValue[sizeof(timeUnitNames)], timeUnitIndex[sizeof(timeUnitNames)], timeUnitTotal;
    
    for(new 
iunitsizeof(timeUnitNames); i++) {
        
unit timeUnitsToSeconds[i];
        
        if((
timeUnitValue[timeUnitTotal] = timeLeftSeconds unit) > 0) {
            
timeUnitIndex[timeUnitTotal++] = i;
            
            
timeLeftSeconds %= unit;
        }
    }
    
    for(new 
0timeUnitTotali++) {
        
timeLeftLen += formatex(timeLeft[timeLeftLen], charsmax(timeLeft) - timeLeftLen"%s%s%s%d %s%s",
        (
&& timeUnitTotal 2) ? ", " "",
        (
&& (timeUnitTotal i) == 1) ? " and" "",
        
" " "",
        
timeUnitValue[i],
        
timeUnitNames[timeUnitIndex[i]],
        (
timeUnitValue[i] == 1) ? "" "s"
        
);
    }
    
    new 
hostName[32];
    
get_user_name(0hostNamecharsmax(hostName));
    
    
/*new players[32], pnum, id;
    get_players(players, pnum, "ch");*/
    
    
new color[12], r[4], g[4];
    
get_pcvar_string(gCvarColorcolorcharsmax(color));
    
strtok(colorrcharsmax(r), colorcharsmax(color), ',');
    
strtok(colorgcharsmax(g), colorcharsmax(color), ',');
    
    
set_hudmessage(str_to_num(r), str_to_num(g), str_to_num(color), get_pcvar_float(gCvarPosX), get_pcvar_float(gCvarPosY), .holdtime HUD_TIME, .channel = -1);
    
show_hudmessage(0"%s^nThe Time: %s^nDate: %s^nTime Left: %s"hostNametimeStringdateStringtimeLeft);
    
    
/*for(new i = 0; i < pnum; i++) {
    id = players[i];
    
    get_time_length(id, timeLeftSeconds, timeunit_seconds, timeLeft, charsmax(timeLeft));
    
    show_hudmessage(id, "%L: %s^n%L: %s^n%s", id, "THE_TIME", time, id, "TIME_LEFT", timeLeft, hostName);
}*/

it could help you

Last edited by JoaoVieira; 02-05-2016 at 18:01.
JoaoVieira 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 04:37.


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