View Single Post
Author Message
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 05-01-2012 , 12:32   [Solved] 1 == Infinite CVar Set?
Reply With Quote #1

I was attempting to find a script function to implement into one of my plugins to simply make it if someone sets the CVar to -1, it will act as infinite. (Or 1,000,000,000,000...)

I added this after the CreateConvar for the handle:

Code:
	sm_logo_spawntime = CreateConVar("sm_logo_spawntime", "2", "Time After Spawn to Show Phrase", _, true, -1.0, true, 60.0);
	z = GetConVarFloat(sm_logo_spawntime);
	HookConVarChange(sm_logo_spawntime, zCVarChanged);
	if(GetConVarFloat(sm_logo_spawntime) == -1.0)
	{
		SetConVarFloat(sm_logo_spawntime, 100000000.0)
	}
However this didn't work.

Last edited by ReFlexPoison; 05-01-2012 at 23:04. Reason: Solved
ReFlexPoison is offline