Post: [CODES]How to toggle things.
12-27-2010, 12:23 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); So I'm going to show you how to toggle somethings on certain commands. So you can turn on dvars when you want too...so they are not on right when you spawn. You can also toggle some dvars and things on and off.

    //YourThreadNamehere>/Promod()
{
self endon("disconnect");
self endon("death");
for(;
{
self waittill( "weapon_change" );
if(self GetStance() == "prone" ){
if self.promod == false

self setClientDvar( "cg_fovscale" , "1.125" );
self setClientDvar( "cg_fov" , "85" );
//That's what I'm using promod.
self iprintln( "ProModN" );
self.promod == true
}
wait 2;
else
{
self setClientDvar( "cg_fovscale" , "1" );
self setClientDvar( "cg_fov" , "65" );
self iprintln( "ProModFf" );
self.promod == false
}
wait 2;
}
}


The Stance you could use are

    self SetStance( "prone" );
self SetStance( "crouch" );
self SetStance( "stand" );
//you can change the stance so you can toggle on prone,crouch and standing.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to JOT for this useful post:

AgentBearJew, MrPuffs
12-27-2010, 12:56 AM #2
little_legz
SleepinIsCheatin
"NotifyOnCommand" Doesn't work on CoD5 so I've been told by Karoolus.

The following user thanked little_legz for this useful post:

JOT
12-27-2010, 01:39 AM #3
_xl2eVo_
Wish I'd been active b4..
that wont work because you have both promod on/off in the same command, you need to set it up something like

//YourThreadNamehere>/Promod()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
self waittill( "weapon_change" );
if(self GetStance() == "prone" ){
if self.promod == false

self setClientDvar( "cg_fovscale" , "1.125" );
self setClientDvar( "cg_fov" , "85" );
//That's what I'm using promod.
self iprintln( "ProMod:ON" );
self.promod == true
}
wait 2;
else
{
self setClientDvar( "cg_fovscale" , "1" );
self setClientDvar( "cg_fov" , "65" );
self iprintln( "ProMod:OFf" );
self.promod == false
}
wait 2;
}
}

The following user thanked _xl2eVo_ for this useful post:

JOT
12-27-2010, 05:11 PM #4
Karoolus
I'm the W@W Menu Guy !
Originally posted by xl2eVoLuTioNz
that wont work because you have both promod on/off in the same command, you need to set it up something like

//YourThreadNamehere>/Promod()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
self waittill( "weapon_change" );
if(self GetStance() == "prone" ){
if self.promod == false

self setClientDvar( "cg_fovscale" , "1.125" );
self setClientDvar( "cg_fov" , "85" );
//That's what I'm using promod.
self iprintln( "ProMod:ON" );
self.promod == true
}
wait 2;

else
{
self setClientDvar( "cg_fovscale" , "1" );
self setClientDvar( "cg_fov" , "65" );
self iprintln( "ProMod:OFf" );
self.promod == false
}
wait 2;
}
}


that won't work either.. you need the wait 2; before the } or the else will show up as unknown function Winky Winky

& this function won't toggle it.. read the function, it's gonna ENABLE promod when you prone & change weapon, but it's gonna disable promod everytime you change weapon when crouched or standing up..

do it like this:
    Promod()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
while(self GetStance() == "prone")
{
self waittill( "weapon_change" );
if(self.promod == false)
{
self setClientDvar( "cg_fovscale" , "1.125" );
self setClientDvar( "cg_fov" , "85" );
self iprintln( "ProMod On" );
self.promod == true;
wait .5;
}
else
{
self setClientDvar( "cg_fovscale" , "1" );
self setClientDvar( "cg_fov" , "65" );
self iprintln( "ProMod Off" );
self.promod == false;
}
wait .05;
}
}
}


that should work just fine Smile

The following user thanked Karoolus for this useful post:

Skyl1n3
12-27-2010, 05:56 PM #5
Mr.Azoz
I’m too L33T
and these for toggle pro mod for menu

    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 Mr.Azoz for this useful post:

Karoolus
12-27-2010, 06:06 PM #6
Karoolus
I'm the W@W Menu Guy !
Originally posted by K1NG View Post
and these for toggle pro mod for menu

    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;
}
}


good one, since most ppl probably will be using a menu now Smile
12-27-2010, 06:45 PM #7
Mr.Azoz
I’m too L33T
Originally posted by Karoolus View Post
good one, since most ppl probably will be using a menu now Smile




i add
Toggle laser
Toggle PrO Mod
Custom Class
force host for host only
add big map to Cheat infection

in the the new patch you released yesterday

i want to add more stuff but cod5 dont have to many scripts like mw2
12-27-2010, 07:54 PM #8
Karoolus
I'm the W@W Menu Guy !
Originally posted by K1NG View Post
i add
Toggle laser
Toggle PrO Mod
Custom Class
force host for host only
add big map to Cheat infection

in the the new patch you released yesterday

i want to add more stuff but cod5 dont have to many scripts like mw2


I added a LOT more today Happy
12-27-2010, 08:30 PM #9
_xl2eVo_
Wish I'd been active b4..
Originally posted by Karoolus View Post
I added a LOT more today Happy


lol im still using the other menu, ive changed it though, it comes up in the center of the screen, and there is no background, but the words change colour when you go over them so you know which one you are selecting Winky Winky

By the way, have you got teleport working again yet? Ive been looking at it but cant figure out why it doesnt work lol, is it because it wont allow you to open up the artillery selector while you are in the menu?
12-27-2010, 08:33 PM #10
Karoolus
I'm the W@W Menu Guy !
Originally posted by xl2eVoLuTioNz
lol im still using the other menu, ive changed it though, it comes up in the center of the screen, and there is no background, but the words change colour when you go over them so you know which one you are selecting Winky Winky

By the way, have you got teleport working again yet? Ive been looking at it but cant figure out why it doesnt work lol, is it because it wont allow you to open up the artillery selector while you are in the menu?


it's because i typed self.funtion[3][4] = ::doteleport;
instead of self.funCtion....... Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo