Cand dau /ore nu se intampla nimic.
Acesta este plugin-ul.
- | Afiseaza codul
[code]#include <amxmodx> #include <amxmisc> #include <fakemeta> #define PLUGIN "Players Time" #define VERSION "1.0" #define AUTHOR "Aragon*" #define TASKID_CHECKTIME 5435 #define DESIGN1_STYLE "<meta charset=UTF-8><style>body{background:#112233;font-family:Arial}th{background:#558866;color:#FFF;padding:10px 2px;text-align:left}td{padding:4px 3px}table{background:#EEEECC;font-size:12px;font-family:Arial}h2,h3{color:#FFF;font-family:Verdana}#c{background:#E2E2BC}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px}</style>" #define DESIGN2_STYLE "<meta charset=UTF-8><style>body{font-family:Arial}th{background:#575757;color:#FFF;padding:5px;border-bottom:2px #BCE27F solid;text-align:left}td{padding:3px;border-bottom:1px #E7F0D0 solid}table{color:#3C9B4A;background:#FFF;font-size:12px}h2,h3{color:#333;font-family:Verdana}#c{background:#F0F7E2}img{height:10px;background:#62B054;margin:0 3px}#r{height:10px;background:#717171}#clr{background:none;color:#575757;font-size:20px}</style>" #define DESIGN3_STYLE "<meta charset=UTF-8><style>body{background:#E6E6E6;font-family:Verdana}th{background:#F5F5F5;color:#A70000;padding:6px;text-align:left}td{padding:2px 6px}table{color:#333;background:#E6E6E6;font-size:10px;font-family:Georgia;border:2px solid #D9D9D9}h2,h3{color:#333;}#c{background:#FFF}img{height:10px;background:#14CC00;margin:0 3px}#r{height:10px;background:#CC8A00}#clr{background:none;color:#A70000;font-size:20px;border:0}</style>" #define DESIGN4_STYLE "<meta charset=UTF-8><style>body{background:#E8EEF7;margin:2px;font-family:Tahoma}th{color:#0000CC;padding:3px}tr{text-align:left;background:#E8EEF7}td{padding:3px}table{background:#CCC;font-size:11px}h2,h3{font-family:Verdana}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#000;font-size:20px}</style>" #define DESIGN5_STYLE "<meta charset=UTF-8><style>body{background:#555;font-family:Arial}th{border-left:1px solid #ADADAD;border-top:1px solid #ADADAD}table{background:#3C3C3C;font-size:11px;color:#FFF;border-right:1px solid #ADADAD;border-bottom:1px solid #ADADAD;padding:3px}h2,h3{color:#FFF}#c{background:#FF9B00;color:#000}img{height:10px;background:#00E930;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px;border:0}</style>" #define DESIGN6_STYLE "<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#303B4A;color:#FFF}table{padding:6px 2px;background:#EFF1F3;font-size:12px;color:#222;border:1px solid #CCC}h2,h3{color:#222}#c{background:#E9EBEE}img{height:7px;background:#F8931F;margin:0 3px}#r{height:7px;background:#D2232A}#clr{background:none;color:#303B4A;font-size:20px;border:0}</style>" #define DESIGN7_STYLE "<meta charset=UTF-8><style>body{background:#FFF;font-family:Verdana}th{background:#2E2E2E;color:#FFF;text-align:left}table{padding:6px 2px;background:#FFF;font-size:11px;color:#333;border:1px solid #CCC}h2,h3{color:#333}#c{background:#F0F0F0}img{height:7px;background:#444;margin:0 3px}#r{height:7px;background:#999}#clr{background:none;color:#2E2E2E;font-size:20px;border:0}</style>" #define DESIGN8_STYLE "<meta charset=UTF-8><style>body{background:#242424;margin:20px;font-family:Tahoma}th{background:#2F3034;color:#BDB670;text-align:left} table{padding:4px;background:#4A4945;font-size:10px;color:#FFF}h2,h3{color:#D2D1CF}#c{background:#3B3C37}img{height:12px;background:#99CC00;margin:0 3px}#r{height:12px;background:#999900}#clr{background:none;color:#FFF;font-size:20px}</style>" #define DESIGN9_STYLE "<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#056B9E;color:#FFF;padding:3px;text-align:left;border-top:4px solid #3986AC}td{padding:2px 6px}table{color:#006699;background:#FFF;font-size:12px;border:2px solid #006699}h2,h3{color:#F69F1C;}#c{background:#EFEFEF}img{height:5px;background:#1578D3;margin:0 3px}#r{height:5px;background:#F49F1E}#clr{background:none;color:#056B9E;font-size:20px;border:0}</style>" #define DESIGN10_STYLE "<meta charset=UTF-8><style>body{background:#4C5844;font-family:Tahoma}th{background:#1E1E1E;color:#C0C0C0;padding:2px;text-align:left;}td{padding:2px 10px}table{color:#AAC0AA;background:#424242;font-size:13px}h2,h3{color:#C2C2C2;font-family:Tahoma}#c{background:#323232}img{height:3px;background:#B4DA45;margin:0 3px}#r{height:3px;background:#6F9FC8}#clr{background:none;color:#FFF;font-size:20px}</style>" #define DESIGN11_STYLE "<meta charset=UTF-8><style>body{background:#F2F2F2;font-family:Arial}th{background:#175D8B;color:#FFF;padding:7px;text-align:left}td{padding:3px;border-bottom:1px #BFBDBD solid}table{color:#153B7C;background:#F4F4F4;font-size:11px;border:1px solid #BFBDBD}h2,h3{color:#153B7C}#c{background:#ECECEC}img{height:8px;background:#54D143;margin:0 3px}#r{height:8px;background:#C80B0F}#clr{background:none;color:#175D8B;font-size:20px;border:0}</style>" #define DESIGN12_STYLE "<meta charset=UTF-8><style>body{background:#283136;font-family:Arial}th{background:#323B40;color:#6ED5FF;padding:10px 2px;text-align:left}td{padding:4px 3px;border-bottom:1px solid #DCDCDC}table{background:#EDF1F2;font-size:10px;border:2px solid #505A62}h2,h3{color:#FFF}img{height:10px;background:#A7CC00;margin:0 3px}#r{height:10px;background:#CC3D00}#clr{background:none;color:#6ED5FF;font-size:20px;border:0}</style>" #define DESIGN13_STYLE "<meta charset=UTF-8><style>body{background:#220000;font-family:Tahoma}th{background:#3E0909;color:#FFF;padding:5px 2px;text-align:left;border-bottom:1px solid #DEDEDE}td{padding:2px 2px;}table{background:#FFF;font-size:11px;border:1px solid #791616}h2,h3{color:#FFF}#c{background:#F4F4F4;color:#7B0000}img{height:7px;background:#a00000;margin:0 3px}#r{height:7px;background:#181818}#clr{background:none;color:#CFCFCF;font-size:20px;border:0}</style>" #define DEFAULT_STYLE "<meta charset=UTF-8><style>body{background:#000}tr{text-align:left}table{font-size:13px;color:#FFB000;padding:2px}h2,h3{color:#FFF;font-family:Verdana}img{height:5px;background:#0000FF;margin:0 3px}#r{height:5px;background:#FF0000}</style>" new Hours[33], Minutes[33], Secounds[33] new PlayersTimeFile[128] new cvar_motd_style public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("time", "ShowTime") register_clcmd("say /time", "ShowTime") register_clcmd("say_team /time", "ShowTime") register_clcmd("playerstime", "PlayersTime"); register_clcmd("say /ore", "PlayersTime"); register_clcmd("say_team /ore", "PlayersTime"); register_forward(FM_ClientUserInfoChanged, "FWD_ChangeName"); cvar_motd_style = register_cvar("amx_playerstime_motdstyle", "10"); new DataDir[64] get_datadir(DataDir, 63) format(PlayersTimeFile, 127, "%s/PlayersTime.dat", DataDir) } public client_connect(id) { Hours[id] = -1 Minutes[id] = -1 Secounds[id] = -1 LoadTime(id); } public client_putinserver(id) { !task_exists(id + TASKID_CHECKTIME) ? set_task(1.0, "CheckTime", id + TASKID_CHECKTIME) : 0 } public client_disconnect(id) { remove_task(id + TASKID_CHECKTIME); } public FWD_ChangeName(id, buffer) { if(is_user_connected(id)) { static Name[32], Val[32]; get_user_name(id, Name, sizeof Name - 1); engfunc(EngFunc_InfoKeyValue, buffer, "name", Val, sizeof Val - 1); if(equal(Val, Name)) return FMRES_IGNORED; set_task(0.2, "client_connect", id); task_exists(id + TASKID_CHECKTIME) ? remove_task(id + TASKID_CHECKTIME) : 0 !task_exists(id + TASKID_CHECKTIME) ? set_task(1.0, "CheckTime", id + TASKID_CHECKTIME) : 0 } return FMRES_SUPERCEDE; } public CheckTime(id) { id -= TASKID_CHECKTIME if(is_user_connected(id) && get_user_team(id) != 3) { if(Secounds[id] + 1 >= 60) { if(Minutes[id] + 1 >= 60) { if(Hours[id] == -1) Hours[id] += 2 else Hours[id] += 1 Minutes[id] = 0 } else if(Minutes[id] == -1) Minutes[id] += 2 else Minutes[id] += 1 Secounds[id] = 0 } else if(Secounds[id] == -1) Secounds[id] += 2 else Secounds[id] += 1 SaveTime(id) } set_task(1.0, "CheckTime", id + TASKID_CHECKTIME); } public ShowTime(id) { static Ore[512] static Minute[512] if(Hours[id] != -1) formatex(Ore, sizeof(Ore)-1, "!x03%d!x04 Or%s ", Hours[id], Hours[id] == 1 ? "a" : "e"); if(Minutes[id] != -1) formatex(Minute, sizeof(Minute)-1, "!x03%d!x04 Minut%s ", Minutes[id], Minutes[id] == 1 ? "" : "e"); ColorChat(id, "!x04Timp Jucat: %s%s!x03%d!x04 Secund%s", Ore, Minute, Secounds[id], Secounds[id] == 1 ? "a" : "e"); } public PlayersTime(id) { if(is_user_connected(id)) { new MotdMessage[2048]; new Pos = 0, Name[64], PlayersName[64]; get_user_name(id, Name, 63); switch(get_pcvar_num(cvar_motd_style)) { case 1: Pos = format(MotdMessage, 2047, DESIGN1_STYLE) case 2: Pos = format(MotdMessage, 2047, DESIGN2_STYLE) case 3: Pos = format(MotdMessage, 2047, DESIGN3_STYLE) case 4: Pos = format(MotdMessage, 2047, DESIGN4_STYLE) case 5: Pos = format(MotdMessage, 2047, DESIGN5_STYLE) case 6: Pos = format(MotdMessage, 2047, DESIGN6_STYLE) case 7: Pos = format(MotdMessage, 2047, DESIGN7_STYLE) case 8: Pos = format(MotdMessage, 2047, DESIGN8_STYLE) case 9: Pos = format(MotdMessage, 2047, DESIGN9_STYLE) case 10: Pos = format(MotdMessage, 2047, DESIGN10_STYLE) case 11: Pos = format(MotdMessage, 2047, DESIGN11_STYLE) case 12: Pos = format(MotdMessage, 2047, DESIGN12_STYLE) case 13: Pos = format(MotdMessage, 2047, DESIGN13_STYLE) default: Pos = format(MotdMessage, 2047, DEFAULT_STYLE) } Pos += format(MotdMessage[Pos], 2047 - Pos, "<body><center><table border=0 width=50%%><th>Nume<th>Timp jucat pe server") for(new i = 0; i < get_maxplayers(); i++) { if(is_user_connected(i)) { get_user_name(i, PlayersName, 63); new Ore[512] new Minute[512] new Secunde[512] if(Hours != -1) format(Ore, sizeof(Ore)-1, "%d Or%s ", Hours, Hours == 1 ? "a" : "e"); if(Minutes != -1) format(Minute, sizeof(Minute)-1, "%d Minut%s ", Minutes, Minutes == 1 ? "" : "e"); formatex(Secunde, sizeof(Secunde)-1, "%d Secund%s", Secounds, Secounds == 1 ? "a" : "e"); if(equal(Name, PlayersName)) Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr id=c><td>%s<td>%s%s%d Secund%s", PlayersName, Ore, Minute, Secounds, Secounds == 1 ? "a" : "e"); else Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr><td>%s<td>%s%s%s", PlayersName, Ore, Minute, Secunde) } } show_motd(id, MotdMessage, "Players Time"); } } // Save Time public SaveTime(id) { new Name[32]; get_user_name(id, Name, 31); static Data[1024] formatex(Data, sizeof(Data) - 1, "^"%i^" ^"%i^" ^"%i^"", Hours[id], Minutes[id], Secounds[id]) new Save[512] format(Save, 511, "^"%s^" %s", Name, Data) new Line[128], Linie, IsPlayer = false, Arg1[32], Arg2[32], Arg3[32] new FileOpen = fopen(PlayersTimeFile, "rt") while(!feof(FileOpen)) { fgets(FileOpen, Line, 127) trim(Line) parse(Line, Arg1, 31, Arg2, 31, Arg3, 31) if (equali(Arg1, Name)) { write_file(PlayersTimeFile, Save, Linie) IsPlayer = true break } Linie++ } fclose(FileOpen) if (!IsPlayer) { write_file(PlayersTimeFile, Save, -1) } } // Load Time public LoadTime(id) { new Name[32]; get_user_name(id, Name, 31); new Line[128], IsPlayer = false, Arg1[32], Arg2[32], Arg3[32], Arg4[32]; new FileOpen = fopen(PlayersTimeFile, "rt") while(!feof(FileOpen)) { fgets(FileOpen, Line, 127) trim(Line) parse(Line, Arg1, 31, Arg2, 31, Arg3, 31, Arg4, 31) if (equali(Arg1, Name)) { Hours[id] = str_to_num(Arg2) Minutes[id] = str_to_num(Arg3) Secounds[id] = str_to_num(Arg4) IsPlayer = true break } } fclose(FileOpen) if (!IsPlayer) { Hours[id] = -1 Minutes[id] = -1 Secounds[id] = -1 } } stock ColorChat(const id, const input[], any:...) { new count = 1, players[32]; static msg[191]; vformat(msg, 190, input, 3); replace_all(msg, 190, "!x04", "^4"); replace_all(msg, 190, "!x01", "^1"); replace_all(msg, 190, "!x03", "^3"); if(id) players[0] = id; else get_players(players, count, "ch"); { for(new i = 0; i < count; i++) { if(is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]); write_byte(players[i]); write_string(msg); message_end(); } } } }[/code]
Iar aceasta este lista de pluginuri.
- | Afiseaza codul
[code]; AMX Mod X plugins ; Admin Base - Always one has to be activated admin.amxx ; admin base (required for any admin-related) ;admin_sql.amxx ; admin base - SQL version (comment admin.amxx) ; Basic admincmd.amxx ; basic admin console commands adminhelp.amxx ; help command for admin console commands adminslots.amxx ; slot reservation multilingual.amxx ; Multi-Lingual management ; Menus menufront.amxx ; front-end for admin menus cmdmenu.amxx ; command menu (speech, settings) plmenu.amxx ; players menu (kick, ban, client cmds.) ;telemenu.amxx ; teleport menu (Fun Module required!) mapsmenu.amxx ; maps menu (vote, changelevel) pluginmenu.amxx ; Menus for commands/cvars organized by plugin ; Chat / Messages adminchat.amxx ; console chat commands antiflood.amxx ; prevent clients from chat-flooding the server scrollmsg.amxx ; displays a scrolling message imessage.amxx ; displays information messages adminvote.amxx ; vote commands ; Map related nextmap.amxx ; displays next map in mapcycle ;mapchooser.amxx ; allows to vote for next map timeleft.amxx ; displays time left on map ; Configuration pausecfg.amxx ; allows to pause and unpause some plugins statscfg.amxx ; allows to manage stats plugins via menu and commands ; Counter-Strike ;restmenu.amxx ; restrict weapons menu statsx.amxx ; stats on death or round end (CSX Module required!) ;miscstats.amxx ; bunch of events announcement for Counter-Strike ;stats_logging.amxx ; weapons stats logging (CSX Module required!) ; Enable to use AMX Mod plugins ;amxmod_compat.amxx ; AMX Mod backwards compatibility layer ; Custom - Add 3rd party plugins here surf_olympics.amxx ; Pluginul de baza. no_fall_damage.amxx ; Nu iti ia din viata la cazaturi. updatehint.amxx ;Apartine de dproto. advanced_gag.amxx ; Gag avansat. galileo.amxx ; Sistem de vot avansat. amxx_fuckoff.amxx ; Comenzi anti codati. ultimate_restart.amxx ; Restart prin comanda /restart. QuakeSounds.amxx ; Diverse sunete pe server. bullet_damage.amxx ; Arata cat HP ii iei adversarului in forma de cerc. hegiver.amxx ; Jucatorii primesc cate un HE la fiecare respawn. HighPingMode.amxx ; Da kick celor cu lag mare. spawnprotection.amxx ; Protectie la spawn. semiclip.amxx ; Jucatorii pot trece unul prin altul. bunnyhop.amxx ; Poti face bhop automat pe server. resetscore.amxx ; Iti reseteaza scorul. fps.amxx ; Iti arata fps-ul. transfer.amxx ; Transfera un jucator intr-o echipa. who.amxx ; Arata adminii online. ghostchat.amxx ; Morii vorbesc cu cei in viata si invers. rang_admin_chat.amxx ; Tag grad admini. GHW_Message_Disp.amxx ;Mesaje in chat si hud. auto_join_on_connect.amxx ; Te pune intr-o echipa la conectare. hud_vip.amxx ; Arata vipii online. ben_vip.amxx ; Arata beneficiile unui vip. ore.amxx ; Arata orele jucate pe server.[/code]