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

Using slowmotion without sv_cheat 1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 02-23-2015 , 15:04   Using slowmotion without sv_cheat 1
Reply With Quote #1

Hello guys,

I hope that I'm in the right section, well my question is if it's possible to use host_timescale without sv_cheat 1 ? so that we can make the slow motion work in coop mission maps online =] thanks!
TheDS1337 is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 02-23-2015 , 15:42   Re: Using slowmotion without sv_cheat 1
Reply With Quote #2

No its not posible it will not work or break the gameplay.
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 02-23-2015 , 15:52   Re: Using slowmotion without sv_cheat 1
Reply With Quote #3

You could perhaps take a look at Freak Fortress 2 Plugin and see how they deal with host_timescale there or slow motion
__________________
...
Oshizu is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 02-23-2015 , 16:00   Re: Using slowmotion without sv_cheat 1
Reply With Quote #4

...sort of. Quick pseudo-code:
Code:
cvarTimeScale=FindConVar("host_timescale"); //Create a command here like sm_timescale so players/admins can set host_timescale to what they want //In your callback for the command you created... char timescale[4]; GetCmdArg(1, timescale, sizeof(timescale)); SetConVarFloat(cvarTimeScale, StringToInt(timescale))//You might want to make sure timescale isn't 0 here

You may need to set each client's cheat value when you do that-I'm not too sure. If so...
Code:
stock void UpdateClientCheatValue(int client, int value) {     if(client>0 && client<=MaxClients && IsClientInGame(client) && IsPlayerAlive(client) && !IsFakeClient(client))     {         char cheatValue[2];         IntToString(value, cheatValue, sizeof(cheatValue));         SendConVarValue(client, cvarCheats, cheatValue);     } }
Something like that *should* work.

EDIT: This uses new-style syntax so you'll need a 1.7 compiler to compile this.
__________________
~Wliu

Last edited by Wliu; 02-23-2015 at 16:01.
Wliu is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 02-23-2015 , 17:42   Re: Using slowmotion without sv_cheat 1
Reply With Quote #5

You can remove the cheats value out of it for the duration of the slow motion, query player host_timescale and kick them if they try to change it while in slowmotion
Mathias. is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-23-2015 , 17:45   Re: Using slowmotion without sv_cheat 1
Reply With Quote #6

Not sure what game your using.

However timescale only effects sounds in csgo. It doesn't slow down gameplay.

You can set it using sm_cvar in console to confirm.

Also be careful as you can crash your server and clients if set to high or low.
__________________
Neuro Toxin is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 02-23-2015 , 18:01   Re: Using slowmotion without sv_cheat 1
Reply With Quote #7

it does slowdown the gameplay, everything.
Mathias. is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 02-23-2015 , 18:18   Re: Using slowmotion without sv_cheat 1
Reply With Quote #8

Quote:
Originally Posted by Neuro Toxin View Post
Not sure what game your using.

However timescale only effects sounds in csgo. It doesn't slow down gameplay.

You can set it using sm_cvar in console to confirm.

Also be careful as you can crash your server and clients if set to high or low.
I'm coming from TF2 in which it slows down *everything*, as Black-Rabbit said.
__________________
~Wliu
Wliu is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 02-23-2015 , 18:33   Re: Using slowmotion without sv_cheat 1
Reply With Quote #9

This could work

PHP Code:
public slowMo() {
    for (new 
1<= MaxClientsi++) {
        if (!
IsClientInGame(i)) 
            continue;
        
SendConVarValue(iFindConVar("host_timescale"), "0.5");
    }
    
SetConVarInt(FindConVar("host_timescale"), "0.5");

Maybe run the SendConVarValue on a timer to make sure client dont change the value somehow

Last edited by Darkness_; 02-23-2015 at 18:34.
Darkness_ is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 03-09-2015 , 07:18   Re: Using slowmotion without sv_cheat 1
Reply With Quote #10

Thanks all for the responds, it seems that the only way is to set sv_cheat 1 during the slow motion and set it back to 0 when the slow motion ends (using a timer like you guys said).

The game mode it's not really a mod tbh it's just some funny maps (coop missions) I found them in workshop but it seems that they won't work in dedicated servers after asking the maps creator.
TheDS1337 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 05:19.


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