Miezis Posted May 26, 2008 Report Share Posted May 26, 2008 Cau, Domāju mans jautājums noderēs arī citiem. Tātad, vēletos uztaisīt 2 maplist, kas strādātu sekojoši, viens pa dienu piemēram no 24:00->08:00 (mazās mapes) no 08:00->24:00 (lielās mapes). Cerams sapratāt, nepieciešams, ka serveris tanī laikā izmanto otru maplistu. Kā to panākt? Link to comment Share on other sites More sharing options...
tk1 Posted May 26, 2008 Report Share Posted May 26, 2008 (edited) Jautājumu tādu ri daudz, mauprāt pat loģiski padomājot var izdomāt p.s. es noteikti taisītu ar crontab Edited May 26, 2008 by tk1 Link to comment Share on other sites More sharing options...
Miezis Posted May 26, 2008 Author Report Share Posted May 26, 2008 Butu pateicigs, ja pastastitu visu sikumos, ka tas darams Link to comment Share on other sites More sharing options...
GOMA smile Posted May 26, 2008 Report Share Posted May 26, 2008 10x runats pskir atpakal kautkur bija Link to comment Share on other sites More sharing options...
DIKI Posted May 26, 2008 Report Share Posted May 26, 2008 bus man ar japaskatas Link to comment Share on other sites More sharing options...
Miezis Posted May 26, 2008 Author Report Share Posted May 26, 2008 ir runats, atradu, bet tur ta ari nav linka uz pluginu.... Link to comment Share on other sites More sharing options...
Kiwix Posted May 26, 2008 Report Share Posted May 26, 2008 Task manager + 2 mapcycle... Un tad @ amxx.cfg amx_task 22:00 "mapcyclefile nakts_mapcycle.txt" t amx_task 22:01 "amx_csay green Nakts Kartes ieladetas" t amx_task 08:00 "mapcyclefile dienas_mapcycle.txt" t amx_task 08:01 "amx_csay green Dienas Kartes ieladetas" t Link to comment Share on other sites More sharing options...
DIKI Posted May 26, 2008 Report Share Posted May 26, 2008 Un tad @ amxx.cfg amx_task 22:00 "mapcyclefile nakts_mapcycle.txt" t amx_task 22:01 "amx_csay green Nakts Kartes ieladetas" t amx_task 08:00 "mapcyclefile dienas_mapcycle.txt" t amx_task 08:01 "amx_csay green Dienas Kartes ieladetas" t chau kiwix gan jau tu atceries mani grietins vai nu giretinas klana biju aizmirsis niku u.t.t nu no AvG.Tm | ja varetu palugt vai nevari man uztaisit tadu failu vnk es tagat dzeris un rit noteikti ari busu taka ja esi draugs izpalidzi plizzz Link to comment Share on other sites More sharing options...
Miezis Posted May 26, 2008 Author Report Share Posted May 26, 2008 ka to uz linux paveikt? parejais taka butu sakidrs un tos amx_task vnk amxx.cfg faila pasa apaksa samest? Link to comment Share on other sites More sharing options...
DIKI Posted May 26, 2008 Report Share Posted May 26, 2008 parejais taka butu sakidrs un tos amx_task vnk amxx.cfg faila pasa apaksa samest? neprasi man Link to comment Share on other sites More sharing options...
*jancis38* Posted May 26, 2008 Report Share Posted May 26, 2008 #include <amxmodx> public load_mapcycle() { new hour[6]; get_time("%H",hour,5) new hrs = str_to_num(hour) if( hrs < 8 ) { server_cmd("mapcyclefile mapcikls/rits.txt") } if( hrs >= 23 ) { server_cmd("mapcyclefile mapcikls/nakts.txt") } return PLUGIN_HANDLED } public plugin_init() { register_plugin("Mapcikls", "v0.1", "Miezenbergs") load_mapcycle() return PLUGIN_CONTINUE } Neesmu gan testējis, bet domāju vajadzētu strādāt. Izveido cstrike mapē mapi mapcikls, un tur izveido nakts.txt un rits.txt Link to comment Share on other sites More sharing options...
.sauliite* Posted June 9, 2008 Report Share Posted June 9, 2008 Strādā! Link to comment Share on other sites More sharing options...
remix.cc Posted June 9, 2008 Report Share Posted June 9, 2008 gribi teikt, ka no 8 lidz 23 palaizas dienas mapcikls? unreal vienos nakti tev bus dienas macikls , desmitos diena defaultais (mapcycle.txt), un no 23-24 nakts ... murgs Link to comment Share on other sites More sharing options...
shine Posted June 9, 2008 Report Share Posted June 9, 2008 (edited) #include <amxmodx> new nightfrom,nightto public plugin_init() { register_plugin("Day/Night Mapcycle","0.7","Sh!nE*") nightfrom = register_cvar("dnm_night_from","23") //24:00 a.k.a 00:00 nightto = register_cvar("dnm_night_to","10") //10:00 load_mapcycle() } public load_mapcycle() { new hours[6] get_time("%H",hours,5) new hour = str_to_num(hours) new from = get_pcvar_num(nightfrom) new to = get_pcvar_num(nightto) if(from > 24 || from < 0 || to < 0 || to > 24) set_fail_state("How many hours are in one day?") if(from > to && (hour > from || hour < to)) server_cmd("mapcyclefile mapcycle/night.txt") else if(hour < to && hour > from) server_cmd("mapcyclefile mapcycle/day.txt") } Edited June 9, 2008 by shine Link to comment Share on other sites More sharing options...
Recommended Posts