View Single Post
feifei
Senior Member
Join Date: Sep 2014
Location: India
Old 11-14-2014 , 11:32   Re: Restart Round (f117bomb)
Reply With Quote #17

Quote:
Originally Posted by _KaszpiR_ View Post
here is a version that i have modified (old amxmod sorcue though). Read the contetns.
I guess this version is a bit more flexible, but may need the amxx testing to be sure it works as it should. (i know amxmod version works well, no idea about amxx version though)


Code:
/* AMX Mod X script. * * (c) Copyright 2002-2003, f117bomb * This file is provided as is (no warranties).     this version was modified by _KaszpiR_ <a href="http://nvt.prv.pl" target="_blank" rel="nofollow noopener">http://nvt.prv.pl</a>   i made the restart times and delay optional  amx_rr [restart times] [delay]   amx_rr 3 3      - 3 restarts, 3 sec delay each     amx_rr 3        - 3 restarts, X sec delay each   amx_rr          - Y restat, X second  Cvars for default command use control   amx_rr_dealy X // sets the default dealy between delays, X is a number in seconds   amx_rr_times Y // sets the default restart times on command call, default is 1 , number   amx_rr_announce 1 / 0  // announce the restarts to all * */ #include <amxmod> #include <amxmisc> public drestart(param[])    set_cvar_string("sv_restart",param) public admin_rr(id, level, cid) {    if (!cmd_access(id, level, cid,1))       return PLUGIN_HANDLED    new delay,times    new sdelay[4], stimes[4]    read_argv(1,stimes,4)    read_argv(2,sdelay,4)    times = strtonum(stimes)    delay = strtonum(sdelay)    if(!delay){      if(!get_cvar_num("amx_rr_delay")) delay = 3 //securty fix      else delay = get_cvar_num("amx_rr_delay")      }    if(!times){      if(!get_cvar_num("amx_rr_times")) times = 1 //securty fix      else times = get_cvar_num("amx_rr_times")      }    numtostr(delay, sdelay, 4)         for(new a = times;a > 0;--a)      set_task( float(delay * a) + 1.0 , "drestart", 0, sdelay, 4)    if(get_cvar_num("amx_rr_announce"))      console_print(id,"[AMX] RR - The Game will restart %d times with a %d sec. delay between restarts",times,delay)        new authid[32],name[32]    get_user_authid(id,authid,15)    get_user_name(id,name,31)      log_message("[AMX] RR - '%s<%s>' triggered RoundRestart.",name, authid)    log_message("[AMX] RR - The Game will restart %d times with a %d sec. delay between restarts",times,delay)    return PLUGIN_HANDLED } public plugin_init() {    register_plugin("Admin RestartRound","X0.16","f117bomb")    register_concmd("amx_rr","admin_rr",ADMIN_LEVEL_A,"[restart times] [delay]. See also cvars amx_rr_times, amx_rr_delay, amx_rr_announce.")        register_cvar("amx_rr_times","1")    register_cvar("amx_rr_delay","3")    register_cvar("amx_rr_announce","1")        return PLUGIN_CONTINUE }
I have tested your plugin, didn't getting error.

and I installed map specific multimod plugins, so each maps have different time.
some times time not sow properly after round restart times work properly.

so what should I add in de_dust.cfg

amx_rr_dealy 1
amx_rr_times 1
amx_rr_announce 1

I added those lines in de_dust.cfg but nothing happened when I join my server for testing.
is it need minimum 2 players ??
__________________
MaTriX is my life
Visit Here ;) For ZP MODs
feifei is offline