Raised This Month: $51 Target: $400
 12% 

[REQ] host_timescale without sv_cheats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JosephOhSnap
New Member
Join Date: May 2009
Old 05-22-2009 , 11:22   [REQ] host_timescale without sv_cheats
Reply With Quote #1

Hello. This is my first post but i am a long time user of sourcemod and plugins made and posted on these forums. now, down to buisness.

I am looking for a plugin that will let me change the host_timescale variable on my server without turning sv_cheats on. I have already searched the forums and unless i misread something, none of them allow you to do this.

I can not code for my life, so i can not write the plugin myself. but i really need a plugin that can do this. If nobody is willing to help me, can you point me in the direction of another plugin that does the same thing for a different command like this one? I can probably do enough coding to modify the script for another plugin.

Thank you for reading this and for all the great plugins you guys have made.
JosephOhSnap is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-22-2009 , 12:44   Re: [REQ] host_timescale without sv_cheats
Reply With Quote #2

Either
PHP Code:
#pragma semicolon 1
#include <sourcemod>
public OnPluginStart() {
    new 
Handle:cvar FindConVar("host_timescale");
    
SetConVarFlags(cvarGetConVarFlags(cvar)&~FCVAR_CHEAT);

or
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#define PLUGIN_VERSION "1.0"
public OnPluginStart() {
    
LoadTranslations("common.phrases");
    
RegAdminCmd("sm_scvar"Command_scvarADMFLAG_GENERIC"Usage: sm_scvar <name/#userid> <cvar> <value>");
}
public 
Action:Command_scvar(clientargs) {
    if(
args==3) {
        
decl String:arg1[64];
        
GetCmdArg(1arg1sizeof(arg1));
        new 
targ FindTarget(0arg1falsefalse);
        if(
targ!=-1) {
            
decl String:arg2[64], String:arg3[64];
            
GetCmdArg(2arg2sizeof(arg2));
            
GetCmdArg(3arg3sizeof(arg3));
            
SendConVarValue(targFindConVar(arg2), arg3);
            
ReplyToCommand(client"[SM] Sent %s = %s to %N."arg2arg3targ);
        }
    } else {
        
ReplyToCommand(client"[SM] Usage: sm_scvar <name/#userid> <cvar> <value>");
    }
    return 
Plugin_Handled;

"sm_scvar player sv_cheats 1 then "sm_scvar player host_timescale x".

If you're doing it to get unlocks in TF2, neither of them work.
__________________
MikeJS is offline
JosephOhSnap
New Member
Join Date: May 2009
Old 05-22-2009 , 14:04   Re: [REQ] host_timescale without sv_cheats
Reply With Quote #3

Thank you for the help.
JosephOhSnap is offline
Acid07
Member
Join Date: May 2009
Old 05-23-2009 , 06:38   Re: [REQ] host_timescale without sv_cheats
Reply With Quote #4

this is nice! dont suppose you can do it so that its possible to do the timescale separatly for each player?
Acid07 is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-23-2009 , 07:07   Re: [REQ] host_timescale without sv_cheats
Reply With Quote #5

sm_scvar player1 sv_cheats 1
sm_scvar player2 sv_cheats 1
sm_scvar player1 host_timescale 0.5
sm_scvar player2 host_timescale 2
__________________
MikeJS is offline
Acid07
Member
Join Date: May 2009
Old 05-23-2009 , 07:18   Re: [REQ] host_timescale without sv_cheats
Reply With Quote #6

thx
Acid07 is offline
ThatGuy
Senior Member
Join Date: Nov 2007
Old 05-23-2009 , 09:14   Re: [REQ] host_timescale without sv_cheats
Reply With Quote #7

Wow that's really fancy haha


If you do the cheats & timescale on player1, will it disable achievements only for player1 and not for everyone else?
__________________
ThatGuy is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-23-2009 , 12:20   Re: [REQ] host_timescale without sv_cheats
Reply With Quote #8

Quote:
Originally Posted by ThatGuy View Post
If you do the cheats & timescale on player1, will it disable achievements only for player1 and not for everyone else?
Probably
__________________
MikeJS is offline
fastix
Junior Member
Join Date: May 2009
Old 05-29-2009 , 10:32   Re: [REQ] host_timescale without sv_cheats
Reply With Quote #9

I saw some server with changed host_timescale and sv_cheats = 0. Movement speed is standard, but fire rate and physics are speeded up. I think there is some another way to change this variable.
fastix is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode