skrim Posted June 26, 2008 Report Share Posted June 26, 2008 (edited) Skatijos so pluginu ieprieksejos postos, bet ta ari nespeju ustadit šo pluģinu vai ari kas vins skaitās #include <amxmodx> new nightfrom,nightto public plugin_init() { register_plugin("Day/Night Mapcycle","0.7","Sh!nE*") nightfrom = register_cvar("dnm_night_from","23") //23: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") } Ja kads zin ka kur kas jaraksta un ka jaliek vins un kur jaliek. EDIT: Varbut ir kads cits plugins kas automatiski parslēdz dienas map ciklu uz nakts? Edited June 26, 2008 by skrim Link to comment Share on other sites More sharing options...
Norek Posted June 26, 2008 Report Share Posted June 26, 2008 Kompilēt māki ? Šis arī automātiski pārslēdz. Link to comment Share on other sites More sharing options...
skrim Posted June 26, 2008 Author Report Share Posted June 26, 2008 (edited) Šis arī automātiski pārslēdz. Nu kopilet maku a kas vins jakompile, vins ir ka plugins ja. Un vel kas kur ir jaliek ties 2 izveidotais map cikli EDIT: Paldies ka pateici ka vins jakompile, man viss sanaca, cerams ka vins automatiski parslegs uz dienas mapem. Edited June 26, 2008 by skrim Link to comment Share on other sites More sharing options...
Litrins Posted June 27, 2008 Report Share Posted June 27, 2008 hmm.. es nesaprotu! kr4 man tas night.txt day.txt ir jataisa speciala mapcycle mape ?? un pec tam man tajos night.txt un day.txt ieksha ir jasaraksta mapes? kadas gribu lai butu diena un kadas nakti? Link to comment Share on other sites More sharing options...
shine Posted June 27, 2008 Report Share Posted June 27, 2008 laikam gan! Link to comment Share on other sites More sharing options...
GOMA smile Posted June 27, 2008 Report Share Posted June 27, 2008 uZTAISI JAUNU PAPKU mapcycle UN TAJA UZTAISI IEGSA day.txt un night.txt un kartra raksti Link to comment Share on other sites More sharing options...
Norek Posted June 27, 2008 Report Share Posted June 27, 2008 Litrin, saprati pareizi. Link to comment Share on other sites More sharing options...
Litrins Posted June 27, 2008 Report Share Posted June 27, 2008 heh.. Paldies.. ieprieksh ari ta biju domajis bet nebiju parliecinajies.. Link to comment Share on other sites More sharing options...
Litrins Posted June 27, 2008 Report Share Posted June 27, 2008 hmm.. a kur mape jataisa ir tas Mapcycyle mape? Cstrike ja ? Link to comment Share on other sites More sharing options...
Norek Posted June 27, 2008 Report Share Posted June 27, 2008 nav ne jausmas. varētu būt, ka tur, kur plugins. Link to comment Share on other sites More sharing options...
skrim Posted June 27, 2008 Author Report Share Posted June 27, 2008 Kaut kas tomer nestrada, vins neparlec automatiski uz dienas mapem. paskataties varbut kas nepareizi salikts #include <amxmodx> new nightfrom,nightto public plugin_init() { register_plugin("Day/Night Mapcycle","0.7","Sh!nE*") nightfrom = register_cvar("dnm_night_from","24") //24:00 nightto = register_cvar("dnm_night_to","8") //08: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 && (24 > from || hour < 8)) server_cmd("mapcyclefile mapcycle/night.txt") else if(8 < to && hour > 24) server_cmd("mapcyclefile mapcycle/day.txt") } Link to comment Share on other sites More sharing options...
Norek Posted June 27, 2008 Report Share Posted June 27, 2008 Kapēc Tev pēdējās 4 rindās ir kaut kādas konstantes ? Tur Tev vispār nekas nebija jālabo, jo mainīgie jau ir definēti. Tev bija tikai jāizmaina register_cvar() - jāieliek savas stundas, jānokompilē un jāaizmirst. Link to comment Share on other sites More sharing options...
skrim Posted June 27, 2008 Author Report Share Posted June 27, 2008 Tad ka isti jabut ar tiem laikiem ja vari plz saliec un ieliec kodu Link to comment Share on other sites More sharing options...
Norek Posted June 27, 2008 Report Share Posted June 27, 2008 Šitā jābūt! Šādi izskatās skaists kods #include <amxmodx> new nightfrom,nightto public plugin_init() { register_plugin("Day/Night Mapcycle","0.7","Sh!nE*") // LABOT TIKAI ŠO nightfrom = register_cvar("dnm_night_from","24") nightto = register_cvar("dnm_night_to","8") // ZEMAAK NEKO LABOT NEDRIIKST 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") } Link to comment Share on other sites More sharing options...
shine Posted June 27, 2008 Report Share Posted June 27, 2008 Thanks n0r3k ka indentoji skriptu XD Izskataas.. skaisti XD! Link to comment Share on other sites More sharing options...
skrim Posted June 27, 2008 Author Report Share Posted June 27, 2008 Nu tik un ta stav tas nakts cikls tas dienas cikls vispar nepariet... Nonemu so pluginu tad atkal parastais map cikls ari vairs nestrada Link to comment Share on other sites More sharing options...
shine Posted June 27, 2008 Report Share Posted June 27, 2008 mapcyclefile "file"... Link to comment Share on other sites More sharing options...
Norek Posted June 27, 2008 Report Share Posted June 27, 2008 ok, ļauj man mazliet padomāt. jāpārbauda ar reāliem cipariem tas skripts. EDIT: šobrīd vienīgais, kas strādā pilnībā, ir nakts cikls. no 0 līdz 8 ir nakts cikls. ša palabošu. Link to comment Share on other sites More sharing options...
shine Posted June 27, 2008 Report Share Posted June 27, 2008 (edited) EDIT: Vienkarshi sapratu savu kljuudu.. sorry: #include <amxmodx> new nightfrom,nightto public plugin_init() { register_plugin("Day/Night Mapcycle","0.7","Sh!nE*") nightfrom = register_cvar("dnm_night_from","24") nightto = register_cvar("dnm_night_to","8") 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)) || (from < to && (hour < from || hour > to))) server_cmd("mapcyclefile mapcycle/night.txt") else server_cmd("mapcyclefile mapcycle/day.txt") } jauztaisa mapee cstrike mape ar nosaukumu mapcycle, tur jauztaisa 2 faili - night.txt un day.txt. Tur salieciet savas mapes.. Edited June 27, 2008 by shine Link to comment Share on other sites More sharing options...
Norek Posted June 27, 2008 Report Share Posted June 27, 2008 jup, ir pareizi - strādā. Link to comment Share on other sites More sharing options...
skrim Posted June 27, 2008 Author Report Share Posted June 27, 2008 (edited) nu pameginasim tagad lai gan es cstrike to mapi taisiju un night un day ieksa vina bij ielicis EDIT: Nu ko uzstadiju tagad tikai jagaida rits, cerams stradas. Neko nemainiju taja coda pedeja kuru ieliki, un cstrike mape izveidoju mapcycle/night.tx un day.tx Edited June 27, 2008 by skrim Link to comment Share on other sites More sharing options...
Litrins Posted June 28, 2008 Report Share Posted June 28, 2008 hmm.. jaut ka var nonemt to lielo 5 voti? jo man tas visu tik sa4akre! Link to comment Share on other sites More sharing options...
Litrins Posted June 28, 2008 Report Share Posted June 28, 2008 ahh.. man kr4 es to mapcycle.sma nocomplitetju kr4 panjemu to mapcycle.amxx un iemetu plugins mape un tad pierakstiju klat pie plugins.ini to mapcycle.amxx Un man tgd kka visas mapes nextmapa ir ari tadas piem uzlikot fy_iceworld2k nextmap man atkal ir fy_iceworld2k kadelj taa? Kads var palidzet? Link to comment Share on other sites More sharing options...
skrim Posted June 28, 2008 Author Report Share Posted June 28, 2008 Vis strāda Nezinu ko tu tur izlaboji, bet vis sāka strādat ka vaig Link to comment Share on other sites More sharing options...
shine Posted June 28, 2008 Report Share Posted June 28, 2008 (edited) Nonjem mapchooser pluginu... noteikti arii nextmap ir pie vainas.. Vai arii atstaaj abus, bet izdzees maps.ini Edited June 28, 2008 by shine Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now