View Single Post
zerak
Senior Member
Join Date: Feb 2008
Old 08-29-2008 , 19:20   Re: SM Nextmap Info
Reply With Quote #10

It is a neat and simple plugin indeed that will fit a lot of people but my points was if you are bored you could expand it to consider other parameters for mapchange like winlimit and roundlimit etc. instead of only timelimit.

Code:
public CvarChange_Timelimit(Handle:cvar, const String:oldvalue[], const String:newvalue[])
{
	if(StringToInt(newvalue) == 1){
		InitTimer();
	}
}
I might be wrong here but shouldn't it be > 0 instead, this will still cause a problem when set to 0 (infinity) but I don't know if that could be avoided (that is if the function is called for invalid values)

Code:
public CvarChange_Timelimit(Handle:cvar, const String:oldvalue[], const String:newvalue[])
{
	if(StringToInt(newvalue) > 0 ){
		InitTimer();
	}
}
StringToInt
Quote:
Integer conversion of string, or 0 on failure.
zerak is offline