Post: Is there a way to make promod into toggle?
01-12-2011, 10:27 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I just made my first CL today with a normal CL patch. I like promod and want to host rooms, but it annoys me that I can't keep it after I die, and have to reset it everytime. Is there a way to make promod stay even if you die? And making it into a toggle would be nice as well.
(adsbygoogle = window.adsbygoogle || []).push({});
01-13-2011, 03:58 AM #2
To set promod as a toggle, try something similar to this :
    Togglepromod() 
{
if(self.promod == true )
{
self setClientDvar( "cg_fovscale" , "1.125" );
self setClientDvar( "cg_fov" , "85" );
self iprintln( "ProMod ^2on" );
self.promod = false;
}
else
{
self setClientDvar( "cg_fovscale" , "1" );
self setClientDvar( "cg_fov" , "65" );
self iprintln( "ProMod ^1off" );
self.promod = true;
}
}


The following user thanked xMySTiFy for this useful post:

Zirnitru
01-13-2011, 02:13 PM #3
Originally posted by xMySTiFy View Post
To set promod as a toggle, try something similar to this :
    Togglepromod() 
{
if(self.promod == true )
{
self setClientDvar( "cg_fovscale" , "1.125" );
self setClientDvar( "cg_fov" , "85" );
self iprintln( "ProMod ^2on" );
self.promod = false;
}
else
{
self setClientDvar( "cg_fovscale" , "1" );
self setClientDvar( "cg_fov" , "65" );
self iprintln( "ProMod ^1off" );
self.promod = true;
}
}




Thanks, and if I make the else{} the same as the if{}, does that make it permanent promod on that patch? Or could I remove else{} altogether?
01-13-2011, 07:24 PM #4
No, if you remove the "else" it will be a permanent promod and you will not be able to toggle.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo