Off-Function?

Posts 1–4 of 4 · Page 1 of 1
Off-Function?
How would I make so I hit 5 to turn it on and 5 again to turn it off? My current one from master131 is not working.

[php]doHostStuff()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("5", "+actionslot 2");
while(1) {
self freezeControlsWrapper(false);
self thread doHostCheats();
self waittill("5");
self iPrintlnBold("^5Host ^1Cheats ^4Activated.");
self waittill("5"); //OFF part
self VisionSetNakedForPlayer("default");
self ThermalVisionFOFOverlayOff();
self show();
}
}

doHostCheats()
{
self hide();
self ThermalVisionFOFOverlayOn();
self VisionSetNakedForPlayer("thermal_mp");
}[/php]
[php]doHostStuff()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("5", "+actionslot 2");
for(;
{
self freezeControlsWrapper(false);
self waittill("5");
self thread doHostCheatsOn();
self iPrintlnBold("^5Host ^1Cheats ^4Activated.");
self waittill("5"); //OFF part
self thread doHostCheatsOff();
}
}

doHostCheatsOn()
{
self hide();
self ThermalVisionFOFOverlayOn();
self VisionSetNakedForPlayer("thermal_mp");
}

doHostCheatsOff()
{
self show();
self ThermalVisionFOFOverlayOff();
self VisionSetNakedForPlayer( getDvar("mapname"), .1 );
}[/php]

Would be my way
You are joking right..
Code:
self freezeControlsWrapper(false); 
    self thread doHostCheats(); 
        self waittill("5"); 
        self iPrintlnBold("^5Host ^1Cheats ^4Activated."); 
        self waittill("5"); //OFF part 
        self VisionSetNakedForPlayer("default");
???
Code:
self freezeControlsWrapper(false); 
        self waittill("5"); 
self thread doHostCheats(); 
        self iPrintlnBold("^5Host ^1Cheats ^4Activated."); 
        self waittill("5"); //OFF part 
        self VisionSetNakedForPlayer("default"); 
..etc
Lolz i found it 2
the [php]self VisionSetNakedForPlayer("default");[/php]
it should be [php]self VisionSetNakedForPlayer(getDvar("map_name", 0));[/php]
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us