AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Force start vote (https://forums.alliedmods.net/showthread.php?t=232209)

Bladell 12-27-2013 08:19

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(idlevelcid){  
    new 
timelimittimeleft
    
new Floatstimeleft

    
if(!cmd_access(idlevelcid2))
        return 
1

    timeleft 
get_timeleft()
    
timelimit get_cvar_num("mp_timelimit") * 60
    
    stimeleft 
float(timelimit timeleft 30)
    
    
ChatColor(id"%d %d %d"timelefttimelimitstimeleft)
    
    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




All times are GMT -4. The time now is 10:11.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.