Thread: SM Time Warp
View Single Post
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 04-18-2011 , 11:17   Re: SM Time Warp
Reply With Quote #6

That doesn't even make sense. You're only turning cheats on to do the r_screenoverlay command and then turning it back off. r_screenoverlay is a cheat for the client but not from the server. Unless you have a listen server then I'm not sure what the problem is.

PHP Code:
ActivateSlow(activatorFloat:periodFloat:timescalebool:isBomb=false)
{
    
ServerCommand("host_timescale %f"timescale);
    
SetConVarInt(CheatCVAR1);
    for (new 
1<= MaxClientsi++)
        if (
IsValidClient(i) && !IsFakeClient(i))
            if (
activator == 0)
                
ClientCommand(i,"r_screenoverlay timewarp/slowdown2");
            else
            {
                new 
sound GetConVarInt(tw_sound);
                
ClientCommand(i,"r_screenoverlay timewarp/slowdown1");
                if ((
sound == && != activator) || (sound && isBomb))
                    
EmitSoundToClient(i"timewarp/warp.mp3");
            }
    
CreateTimer(periodNormTime);

This is what you should do if you insist it's a cheat:
1. Make a global handle, gHandle
2. gHandle = FindConVar("host_timescale")
3. SetConVarFlags(gHandle, GetConVarflags(gHandle) & ~FCVAR_CHEAT)
4. SetConVarFloat(gHandle, newValue)
__________________
databomb is offline