Force start vote
Vote for the next map start when timeleft is under 1 minute. Is there a way to make a command wich start the vote for next map instantly?
I thought to a method wich do this almost instantly but is not working...no ideea why.
PHP Code:
public StartVoteMap(id, level, cid){ new timelimit, timeleft new Float: stimeleft
if(!cmd_access(id, level, cid, 2)) return 1
timeleft = get_timeleft() timelimit = get_cvar_num("mp_timelimit") * 60 stimeleft = float(timelimit - timeleft + 30) ChatColor(id, "%d %d %d", timeleft, timelimit, stimeleft) if(timeleft > (get_pcvar_num(c_VoteMinTimeLeft) * 60)) ChatColor(id, "^4[AMX]^1(VIP) You can use this command only in last %d minutes", get_pcvar_num(c_VoteMinTimeLeft) * 60) else if(timeleft <= (get_pcvar_num(c_VoteMinTimeLeft) * 60)) set_cvar_float("mp_timelimit", stimeleft) else ChatColor(id, "^4[AMX]^1(VIP) Something went wrong, please contact the owner") return 1 }
|