Mapeadores
Hub
Mapeadores
Hub
Zurück zur Website
Community
StartseiteRegelnNeuigkeitenFAQBansSupporter
Forum Mapeadores
Forum
Comunicados21
Anuncios12Eventos8
General1454
Off-Topic1024Presentaciones349International28Youtube28
Servers984
CS:S | ZombieMod | Barricada + Escape210CS:GO | Zombie Escape345CS:GO | KZ Timer2CS:GO | Prey5Bans164Feedback123Unirte133
Mapping533
Problemas y Dudas249Mapas118Guías y Tutoriales110Proyectos Comunitarios24Modelos, Texturas y Partículas11Prefabricados19
Releases2
Mapeadores
Hub
Zurück zur Website
Community
StartseiteRegelnNeuigkeitenFAQBansSupporter
Forum Mapeadores
Forum
Comunicados21
Anuncios12Eventos8
General1454
Off-Topic1024Presentaciones349International28Youtube28
Servers984
CS:S | ZombieMod | Barricada + Escape210CS:GO | Zombie Escape345CS:GO | KZ Timer2CS:GO | Prey5Bans164Feedback123Unirte133
Mapping533
Problemas y Dudas249Mapas118Guías y Tutoriales110Proyectos Comunitarios24Modelos, Texturas y Partículas11Prefabricados19
Releases2
Hub›Forum›Servers›CS:GO | Zombie Escape

[Suggestion] noshake plugin

@FOXinBOX📅 May 2, 2017⏱ 4 Min. Lesezeit👁 1.571 Aufrufe💬 8 Beiträge❤️ 1CS:GO | Zombie Escape
FO
@FOXinBOXOPOriginal
📅 2. Mai 2017#1

Hello, I would like to know - is there any way to install noshake?

This plugin would be useful on some maps, where the screen is often very shaken. This plugin was found a long time ago, in any case - it seems to be a working one.

I just do not want to say anything, the effect of shaking the screen is made on maps for the atmosphere, but there are people who do not like this from themselves.

Again, this plugin has the ability to enable / disable the function for those who do not need it. Below I attach the source code of the plugin I found, and also the code - if you do not want to download the archive.

Source Code

#pragma semicolon 1
 
#include <sourcemod>
#include <sdkhooks>
#include <clientprefs>
 
#pragma newdecls required
 
Handle g_hNoShakeCookie;
ConVar g_Cvar_NoShakeGlobal;
 
bool g_bNoShake[MAXPLAYERS + 1] = {false, ...};
bool g_bNoShakeGlobal = false;
 
public Plugin myinfo =
{
name= "NoShake",
author= "BotoX",
description= "Disable env_shake",
version= "1.0.1",
url= ""
};
 
public void OnPluginStart()
{
RegConsoleCmd("sm_shake", Command_Shake, "[NoShake] Disables or enables screen shakes.");
RegConsoleCmd("sm_noshake", Command_Shake, "[NoShake] Disables or enables screen shakes.");
 
g_hNoShakeCookie = RegClientCookie("noshake_cookie", "NoShake", CookieAccess_Protected);
 
g_Cvar_NoShakeGlobal = CreateConVar("sm_noshake_global", "0", "Disable screenshake globally.", 0, true, 0.0, true, 1.0);
g_bNoShakeGlobal = g_Cvar_NoShakeGlobal.BoolValue;
g_Cvar_NoShakeGlobal.AddChangeHook(OnConVarChanged);
 
HookUserMessage(GetUserMessageId("Shake"), MsgHook, true);
}
 
public void OnClientCookiesCached(int client)
{
static char sCookieValue[2];
GetClientCookie(client, g_hNoShakeCookie, sCookieValue, sizeof(sCookieValue));
g_bNoShake[client] = StringToInt(sCookieValue) != 0;
}
 
public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue)
{
if(StringToInt(newValue) > StringToInt(oldValue))
PrintToChatAll("\x03[NoShake]\x01 Enabled NoShake globally!");
else if(StringToInt(newValue) < StringToInt(oldValue))
PrintToChatAll("\x03[NoShake]\x01 Disabled NoShake globally!");
 
g_bNoShakeGlobal = StringToInt(newValue) != 0;
}
 
public Action MsgHook(UserMsg msg_id, BfRead msg, const int[] players, int playersNum, bool reliable, bool init)
{
if(playersNum == 1 && (g_bNoShakeGlobal || g_bNoShake[players[0]]))
return Plugin_Handled;
else
return Plugin_Continue;
}
 
public Action Command_Shake(int client, int args)
{
if(g_bNoShakeGlobal)
return Plugin_Handled;
 
if(!AreClientCookiesCached(client))
{
ReplyToCommand(client, "\x03[NoShake]\x01 Please wait. Your settings are still loading.");
return Plugin_Handled;
}
 
if(g_bNoShake[client])
{
g_bNoShake[client] = false;
ReplyToCommand(client, "\x03[NoShake]\x01 has been disabled!");
}
else
{
g_bNoShake[client] = true;
ReplyToCommand(client, "\x03[NoShake]\x01 has been enabled!");
}
 
static char sCookieValue[2];
IntToString(g_bNoShake[client], sCookieValue, sizeof(sCookieValue));
SetClientCookie(client, g_hNoShakeCookie, sCookieValue);
 
return Plugin_Handled;
}

Enviolinador
@Enviolinador
📅 2. Mai 2017#2

We already have (our own) no shake in the server, enabled by !noshake. It’s been there for weeks.

FO
@FOXinBOXOP
📅 2. Mai 2017#3

EN
Enviolinador:
We already have (our own) no shake in the server, enabled by !noshake. It’s been there for weeks.

I apologize if it already exists. I just do not have access to the game right now, and the other day I remembered that I wanted to offer this thing. When I last visited ! noshake has not been installed on the server yet. I correctly understood, at the moment such thing is already present on the server? I apologize, because I use Google translator

Enviolinador
@Enviolinador
📅 2. Mai 2017#4

Yes, it’s present.

UN
@Unorth
📅 2. Mai 2017#5

ちょっとBrocali、最後の2週間以内にnoshakeがサーバーに追加されました。あなたは!noshakeでそれを起動することができます。 (Sorry for the shitty Japanese)

FO
@FOXinBOXOP
📅 3. Mai 2017#6

EN
Enviolinador:
Yes, it’s present.

 ![None](https://mapeadores.com/letter_avatar_proxy/v3/letter/u/e5b9ba/40.png) Unorth: 

ちょっとBrocali、最後の2週間以内にnoshakeがサーバーに追加されました。あなたは!noshakeでそれを起動することができます。 (Sorry for the shitty Japanese)

Ok, thanks for answer! And no, I’m not from Japan :slight_smile:

FO
@FOXinBOXOP
📅 22. Mai 2017#7

EN
Enviolinador:
We already have (our own) no shake in the server, enabled by !noshake. It’s been there for weeks.

I would like to know if there is an opportunity to make a different text for !Noshake? For example, at the moment it is not clear if you have this plugin enabled or not. That it is on, that it is off - the same text. Enviolinador

Enviolinador
@Enviolinador
📅 22. Mai 2017#8

Done.

📋 Dieser Beitrag ist Teil des historischen Mapeadores-Forums. Der Inhalt wurde so erhalten, wie er ursprünglich veröffentlicht wurde.