Jump to content
GIGN Forum

Jocīga Ideja


Recommended Posts

Sakarā ar to, ka mana serveris nav īpaši izscēlies ar tautu :blelohs: man ienāca ideja, bet nezinu vai to var īstenot.

Kāds nezin, vai ir tāds scripts, ka serverī iet mape fy_pool_day piemēram, un kad sanāk 5x5 serveris automātiski nomaina uz de_dust2, un ja dd2 tauta paliec 3x3 nomaina atpakal uz fy_pool_day ?

Itkā tas būtu ideals veids, kā nosargāt esošo tautu serverī.

Ja ir kāds kas zin kā to dabūt gatavu, tad lūdzu sakiet :khehehe:

Būšu pateicigs.

Link to comment
Share on other sites

Labi ka Tu tik daudz izklāsti par problēmu, proti kāda velna pēc plugins neiet.

Varētu mēģināt kautkādā veidā izīlēt, bet tam laikam vajadzēs pieredzi.

Vai arī man tik melnās/baltās maģijas grāmata janopērk?

Tas tiešām daudz ko izsaka - "Neiet.". :fsckinsad:

Link to comment
Share on other sites

Vinjsh nomaina mapi/samazina timelimit, kad serveris ir tuksh. Atkal nomaina mapi tikko serverii ieiet kads players tad nomaina mapi... So izdomaa pats :o... Tava situaacija vinjsh iipashi neder :S.

#include <amxmodx>

new num

new large_num

new bool:changing

new const first_small_map[] = "fy_iceworld2k"

new const first_large_map[] = "de_dust2"

public plugin_init() {register_plugin("MC Change","0.7","Sh!nE*");num = register_cvar("amx_min_players","10");large_num = register_cvar("amx_max_players","15");}

public client_connect(id) {

new players = get_playersnum()

new temptext[192]

if(players < get_pcvar_num(num) && !changing) {

changing=true

server_cmd("mapcyclefile ^"mazasmapes.txt^"")

format(temptext,191,"^x04[MCC]^x01MapCycle is going to change because the min player limit has been reached")

set_cvar_num("mp_timelimit",1)

server_cmd("amx_nextmap %s",first_small_map)

}

else if(players > get_pcvar_num(large_num) && !changing) {

server_cmd("mapcyclefile ^"mapcycle.txt^"")

server_cmd("amx_nextmap %s",first_large_map)

format(temptext,191,"^x04[MCC]^x01MapCycle has been changed to normal maps because the max player limit has been reached.")

}

message_begin(MSG_ALL,get_user_msgid("SayText"),{0,0,0},0)

write_byte(0)

write_string(temptext)

message_end()

}

Prieka pec uzchiniiju pluginu, kas nomainiis mapciklu uz mazajaam mapem ja playeri bus mazak par #.. un tikko playeri bus mazak par # vinjsh uzliks timeleft 1min un nextmap uzliks to mapi, kas sma augshaa.. negribeeju chakareeties, lai nolasa 1 rindu in mapcycle... tikko playeri bus vairak par #.. tad uzliks atpakalj defultaas mapes, bet timeleft nemainiis.

Jaizveido mapcikla fails: mazasmapes.txt. Tur jasaliek mapes, kas bus uzliktas, ja bus mazak par # playeriem.

Cvari:

amx_min_players ## //No cik playeriem tiks mainiits mapcikls un uzlikta mazaa mape. Def: 10

amx_max_players ## //No cik playeriem tiks mainiits mapcikls un uzlikta defultaa/lielaa mape. Def: 15

new const first_small_map[] = "fy_iceworld2k"

new const first_large_map[] = "de_dust2"

Pedinjas nomainiet "fy_iceworld2k" uz pirmo mapi, kas atrodas juusu mazasmapes.txt pashaa Augshaa(pirma mape). "de_dust2" nomainiet, kas atrodas mapcycle.txt pashaa augshaa(pirma mape). Vereeju jau neslinkot un uztaisiit, ka pats nolasa... mans plugins nav ideaalais risinaajums.. ja ne tev tad ceru, ka kadam kaadu dienu vinjsh nodereet :o, bet ja ne... tad vismaz patreneeju savas pawn prasmes :o.

Edited by shine
Link to comment
Share on other sites

  • 4 weeks later...

#include <amxmodx>
new num
new large_num
new bool:changing
new const first_small_map[] = "fy_iceworld2k"
new const first_large_map[] = "de_dust2"
public plugin_init() {register_plugin("MC Change","0.7","Sh!nE*");num = register_cvar("amx_min_players","10");large_num = register_cvar("amx_max_players","15");set_cvar_num("mp_timelimit",25);}
public client_connect(id) {
    new players = get_playersnum()
    new temptext[192]
    if(players < get_pcvar_num(num) && !changing) {
        changing=true
        server_cmd("mapcyclefile ^"mazasmapes.txt^"")
        format(temptext,191,"^x04[MCC]^x01MapCycle is going to change because the min player limit has been reached")
        set_cvar_num("mp_timelimit",1)
        server_cmd("amx_nextmap %s",first_small_map)
    }
    else if(players > get_pcvar_num(large_num) && !changing) {
        server_cmd("mapcyclefile ^"mapcycle.txt^"")
        server_cmd("amx_nextmap %s",first_large_map)
        format(temptext,191,"^x04[MCC]^x01MapCycle has been changed to normal maps because the max player limit has been reached.")
    }
    message_begin(MSG_ALL,get_user_msgid("SayText"),{0,0,0},0)
    write_byte(0)
    write_string(temptext)
    message_end()
}

Pamaini: set_cvar_num("mp_timelimit",25), pret savu def timelimitu...

Link to comment
Share on other sites

#include <amxmodx>

new num

new large_num

new bool:changing

new const first_small_map[] = "fy_iceworld2k"

new const first_large_map[] = "de_dust2"

new const mazas_mapes_file[] = "mazasmapes.txt"

new const lielas_mapes_file[] = "mapcycle.txt"

public plugin_init() {register_plugin("MC Change","0.7","Sh!nE*");num = register_cvar("amx_min_players","10");large_num = register_cvar("amx_max_players","15");set_task(1.0,"set_cvars");}

public set_cvars() server_cmd("mp_timelimit 25")

public client_connect(id) {

new players = get_playersnum()

new temptext[192],cyclefile[33]

get_cvar_string("mapcyclefile",cyclefile,32)

if(players < get_pcvar_num(num) && !changing && !equali(cyclefile,mazas_mapes_file)) {

changing=true

server_cmd("mapcyclefile ^"%s^"",mazas_mapes_file)

format(temptext,191,"^x04[MCC]^x01MapCycle is going to change because the min player limit has been reached")

set_cvar_num("mp_timelimit",1)

server_cmd("amx_nextmap %s",first_small_map)

}

else if(players > get_pcvar_num(large_num) && !changing && !equali(cyclefile,lielas_mapes_file)) {

server_cmd("mapcyclefile ^"%s^"",lielas_mapes_file)

server_cmd("amx_nextmap %s",first_large_map)

format(temptext,191,"^x04[MCC]^x01MapCycle has been changed to normal maps because the max player limit has been reached.")

}

message_begin(MSG_ALL,get_user_msgid("SayText"),{0,0,0},0)

write_byte(0)

write_string(temptext)

message_end()

}

mazas_mapes_file = pedinjas jaieraksta mazo mapju mapcikla fails

lielas_mapes_file = pedinjas jaieraksta lielo mapju mapcikla fails

public set_cvars() server_cmd("mp_timelimit 25")

Skaitli 25 japamaina uz savu timelimitu serverim...

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...