Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ConVar sv_footsteps = null; // added from shavit-misc
- public void OnPluginStart()
- {
- sv_footsteps = FindConVar("sv_footsteps"); // added from shavit-misc
- sv_footsteps.Flags &= ~(FCVAR_NOTIFY | FCVAR_REPLICATED); // added from shavit-misc
- }
- public Action SM_Hide(int client, int args)
- {
- SetCookieBool(client, g_hHideCookie, !GetCookieBool(client, g_hHideCookie));
- if(GetCookieBool(client, g_hHideCookie))
- {
- PrintColorText(client, "%s%sPlayers are now %sinvisible",
- g_msg_start,
- g_msg_textcol,
- g_msg_varcol);
- UpdateFootsteps(client, 0);
- }
- else
- {
- PrintColorText(client, "%s%sPlayers are now %svisible",
- g_msg_start,
- g_msg_textcol,
- g_msg_varcol);
- UpdateFootsteps(client, 1);
- }
- return Plugin_Handled;
- }
- void UpdateFootsteps(int client, int value)
- {
- if(sv_footsteps != null)
- {
- char[] sFootsteps = new char[4];
- IntToString(value, sFootsteps, 4);
- sv_footsteps.ReplicateToClient(client, sFootsteps);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment