Jump to content
GIGN Forum

Recommended Posts

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

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

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

#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

  • 2 weeks later...
#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 by shine
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...