Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
Untitled diff
बनाया गया
8 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
126 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
388 लाइनें
सभी को कॉपी करें
124 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
373 लाइनें
सभी को कॉपी करें
/**
/**
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
*
* =============================================================================
* =============================================================================
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
*
2
week gag & mute & ban
*
1
week gag & mute & ban
* MAKS steamcommunity.com/profiles/76561198025355822/
* MAKS steamcommunity.com/profiles/76561198025355822/
* dr lex steamcommunity.com/profiles/76561198008545221/
* dr lex steamcommunity.com/profiles/76561198008545221/
* =============================================================================
* =============================================================================
*
*
* This program is free software; you can redistribute it and/or modify it under
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
* Free Software Foundation.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* details.
*
*
* You should have received a copy of the GNU General Public License along with
* You should have received a copy of the GNU General Public License along with
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
* this program. If not, see <
http://
www.gnu.org/licenses/>.
* this program. If not, see <
www.gnu.org/licenses/>.
*
*
* As a special exception, AlliedModders LLC gives you permission to link the
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
* or <
http://
www.sourcemod.net/license.php>.
* or <
www.sourcemod.net/license.php>.
*
*
*/
*/
#pragma semicolon 1
#pragma semicolon 1
#include <sourcemod>
#include <sourcemod>
#include <sdktools>
#include <sdktools>
#pragma newdecls required
#pragma newdecls required
char sg_fileTxt[160];
char sg_fileTxt[160];
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char sg_log[160];
public Plugin myinfo =
public Plugin myinfo =
{
{
name = "gagmute",
name = "gagmute",
author = "MAKS & dr lex",
author = "MAKS & dr lex",
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
description = "
2 week
gag & mute
",
description = "
gag & mute
& ban
",
version = "1.
1
",
version = "1.
3
",
url = "forums.alliedmods.net/showthread.php?p=2347844"
url = "forums.alliedmods.net/showthread.php?p=2347844"
};
};
public void OnPluginStart()
public void OnPluginStart()
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
RegAdminCmd("sm_addban", CMD_
tyban
, ADMFLAG_BAN, "");
RegAdminCmd("sm_addban", CMD_
addban
, ADMFLAG_BAN, "");
RegAdminCmd("sm_addgag", CMD_
tygag
, ADMFLAG_CHAT, "");
RegAdminCmd("sm_addgag", CMD_
addgag
, ADMFLAG_CHAT, "");
RegAdminCmd("sm_addmute", CMD_
tymute
, ADMFLAG_CHAT, "");
RegAdminCmd("sm_addmute", CMD_
addmute
, ADMFLAG_CHAT, "");
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
BuildPath(Path_SM, sg_fileTxt, sizeof(sg_fileTxt)-1, "data/
gagmute
.txt");
BuildPath(Path_SM, sg_fileTxt, sizeof(sg_fileTxt)-1, "data/
GagMuteBan
.txt");
BuildPath(Path_SM, sg_log, sizeof(sg_log)-1, "logs/GagMuteBan.log");
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
void
Ty
ClientGagMuteBan(int
client)
void
Hx
ClientGagMuteBan(int
&
client)
{
{
KeyValues hGM = new KeyValues("gagmute");
KeyValues hGM = new KeyValues("gagmute");
if (hGM.ImportFromFile(sg_fileTxt))
if (hGM.ImportFromFile(sg_fileTxt))
{
{
char sTeamID[24];
char sTeamID[24];
GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1);
GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1);
if (hGM.JumpToKey(sTeamID))
if (hGM.JumpToKey(sTeamID))
{
{
int iMute = hGM.GetNum("mute", 0);
int iMute = hGM.GetNum("mute", 0);
int iGag = hGM.GetNum("gag", 0);
int iGag = hGM.GetNum("gag", 0);
int iBan = hGM.GetNum("ban", 0);
int iBan = hGM.GetNum("ban", 0);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
delete hGM;
int iTime = GetTime();
int iTime = GetTime();
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (iMute > iTime)
if (iMute > iTime)
{
{
ServerCommand("sm_mute #%d", GetClientUserId(client));
ServerCommand("sm_mute #%d", GetClientUserId(client));
}
}
if (iGag > iTime)
if (iGag > iTime)
{
{
ServerCommand("sm_gag #%d", GetClientUserId(client));
ServerCommand("sm_gag #%d", GetClientUserId(client));
}
}
if (iBan > iTime)
if (iBan > iTime)
{
{
char sTime[24];
char sTime[24];
FormatTime(sTime, sizeof(sTime)-1, "%Y-%m-%d %H:%M:%S", iBan);
FormatTime(sTime, sizeof(sTime)-1, "%Y-%m-%d %H:%M:%S", iBan);
KickClient(client,"Banned (%s)", sTime);
KickClient(client,"Banned (%s)", sTime);
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
delete hGM;
}
}
}
}
public void OnClientPostAdminCheck(int client)
public void OnClientPostAdminCheck(int client)
{
{
if (!IsFakeClient(client))
if (!IsFakeClient(client))
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
Ty
ClientGagMuteBan(client);
Hx
ClientGagMuteBan(client);
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
int
Ty
ClientTimeBan(int &client, int iTime)
int
Hx
ClientTimeBan(int &client, int iTime)
{
{
if (IsClientInGame(client))
if (IsClientInGame(client))
{
{
char sName[32];
char sName[32];
char sTeamID[24];
char sTeamID[24];
KeyValues hGM = new KeyValues("gagmute");
KeyValues hGM = new KeyValues("gagmute");
hGM.ImportFromFile(sg_fileTxt);
hGM.ImportFromFile(sg_fileTxt);
GetClientName(client, sName, sizeof(sName)-12);
GetClientName(client, sName, sizeof(sName)-12);
GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1);
GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1);
if (!hGM.JumpToKey(sTeamID))
if (!hGM.JumpToKey(sTeamID))
{
{
hGM.JumpToKey(sTeamID, true);
hGM.JumpToKey(sTeamID, true);
}
}
int iTimeBan = GetTime() + (iTime * 60);
int iTimeBan = GetTime() + (iTime * 60);
hGM.SetString("Name", sName);
hGM.SetString("Name", sName);
hGM.SetNum("ban", iTimeBan);
hGM.SetNum("ban", iTimeBan);
hGM.Rewind();
hGM.Rewind();
hGM.ExportToFile(sg_fileTxt);
hGM.ExportToFile(sg_fileTxt);
delete hGM;
delete hGM;
return 1;
return 1;
}
}
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public int
TyMenuBan
(Menu menu, MenuAction action, int param1, int param2)
public int
MenuHandler_Ban
(Menu menu, MenuAction action, int param1, int param2)
{
{
if (action == MenuAction_Select)
if (action == MenuAction_Select)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char
i
nfo[
16
];
char
sI
nfo[
8
];
bool found = menu.GetItem(param2,
i
nfo, sizeof(
i
nfo)-1);
bool found = menu.GetItem(param2,
sI
nfo, sizeof(
sI
nfo)-1);
if (found && param1)
if (found && param1)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
int client = StringToInt(
i
nfo);
int client = StringToInt(
sI
nfo);
if (client > 0)
if (client > 0)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (
Ty
ClientTimeBan(client, 60*24*7))
if (
Hx
ClientTimeBan(client, 60*24*7))
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
PrintToChatAll("\x0
4
%d
\x05Min
ban
\x04
%N.\n
", 60*24*7, client);
LogToFileEx(sg_log, "Ban: %N -> %N", param1, client);
PrintToChatAll("\x0
5
%d
min
ban
:
\x04
%N
", 60*24*7, client);
KickClient(client, "%d Min ban.", 60*24*7);
KickClient(client, "%d Min ban.", 60*24*7);
}
}
}
}
}
}
}
}
if (action == MenuAction_End)
if (action == MenuAction_End)
{
{
delete menu;
delete menu;
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public Action CMD_
tyban
(int client, int args)
public Action CMD_
addban
(int client, int args)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (
args
)
if (
client
)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char sArg[8];
if (
IsClientInGame(client)
)
GetCmdArg(1, sArg, sizeof(sArg)-1);
int iArg = StringToInt(sArg);
if (
iArg > 0 && iArg < 33
)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (IsClientInGame(iArg))
char
sName[32
];
{
char sNumber[8];
int iTime = 60*24;
int i
=
1;
if (args > 1)
{
char
sTime[20
];
GetCmdArg(2, sTime, sizeof(sTime)-1);
iTime
=
StringToInt(sTime);
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (TyClientTimeBan(client, iTime))
Menu hMenu = new Menu(MenuHandler_Ban);
{
hMenu.SetTitle("1 week
ban
player"
);
PrintToChatAll("\x04%d \x05Min ban \x04%N.\n", iTime, client);
KickClient(client, "%d Min
ban
.", iTime
);
while (i <= MaxClients
)
}
}
}
}
else
{
if (client)
{
if (IsClientInGame(client)
)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char sName[32];
if (IsClientInGame(i) && !IsFakeClient(i))
char sNumber[8];
int i = 1;
Menu hMenu = new Menu(TyMenuBan);
hMenu.SetTitle("1 week ban player");
while (i <= MaxClients)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (
IsClientInGame(i) && !IsFakeClient(i))
if (
client != i)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (client != i)
GetClientName(i, sName, sizeof(sName)-12);
{
Format(sNumber, sizeof(sNumber)-1, "%d", i);
GetClientName(i, sName, sizeof(sName)-12);
hMenu.AddItem(sNumber, sName);
Format(sNumber, sizeof(sNumber)-1, "%d", i);
hMenu.AddItem(sNumber, sName);
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
i += 1;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
i += 1
;
hMenu.ExitButton = false;
hMenu.Display(client, 20)
;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
Text moved with changes from lines 295-297 (98.3% similarity)
hMenu.ExitButton = false;
hMenu.Display(client, 20);
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return Plugin_Handled;
return Plugin_Handled;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
int
Ty
ClientTimeGag(int &client, int iTime)
int
Hx
ClientTimeGag(int &client, int iTime)
{
{
if (IsClientInGame(client))
if (IsClientInGame(client))
{
{
char sName[32];
char sName[32];
char sTeamID[24];
char sTeamID[24];
KeyValues hGM = new KeyValues("gagmute");
KeyValues hGM = new KeyValues("gagmute");
hGM.ImportFromFile(sg_fileTxt);
hGM.ImportFromFile(sg_fileTxt);
GetClientName(client, sName, sizeof(sName)-12);
GetClientName(client, sName, sizeof(sName)-12);
GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1);
GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1);
if (!hGM.JumpToKey(sTeamID))
if (!hGM.JumpToKey(sTeamID))
{
{
hGM.JumpToKey(sTeamID, true);
hGM.JumpToKey(sTeamID, true);
}
}
int iTimeGag = GetTime() + (iTime * 60);
int iTimeGag = GetTime() + (iTime * 60);
hGM.SetString("Name", sName);
hGM.SetString("Name", sName);
hGM.SetNum("gag", iTimeGag);
hGM.SetNum("gag", iTimeGag);
hGM.Rewind();
hGM.Rewind();
hGM.ExportToFile(sg_fileTxt);
hGM.ExportToFile(sg_fileTxt);
delete hGM;
delete hGM;
ServerCommand("sm_gag #%d", GetClientUserId(client));
ServerCommand("sm_gag #%d", GetClientUserId(client));
return 1;
return 1;
}
}
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public int
TyMenuGage
(Menu menu, MenuAction action, int param1, int param2)
public int
MenuHandler_Gage
(Menu menu, MenuAction action, int param1, int param2)
{
{
if (action == MenuAction_Select)
if (action == MenuAction_Select)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char
i
nfo[
16
];
char
sI
nfo[
8
];
bool found = menu.GetItem(param2,
i
nfo, sizeof(
i
nfo)-1);
bool found = menu.GetItem(param2,
sI
nfo, sizeof(
sI
nfo)-1);
if (found && param1)
if (found && param1)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
int client = StringToInt(
i
nfo);
int client = StringToInt(
sI
nfo);
if (client > 0)
if (client > 0)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (
Ty
ClientTimeGag(client, 60*24*7))
if (
Hx
ClientTimeGag(client, 60*24*7))
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
PrintToChatAll("\x0
4
%d
\x05Min
gage
\x04
%N.\n
", 60*24*7, client);
LogToFileEx(sg_log, "Gage: %N -> %N", param1, client);
PrintToChatAll("\x0
5
%d
min
gage
:
\x04
%N
", 60*24*7, client);
}
}
}
}
}
}
}
}
if (action == MenuAction_End)
if (action == MenuAction_End)
{
{
delete menu;
delete menu;
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public Action CMD_
tygag
(int client, int args)
public Action CMD_
addgag
(int client, int args)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (client
&& IsClientInGame(client)
)
if (client
)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char sName[32];
if (IsClientInGame(client))
char sNumber[8];
{
int i = 1;
char sName[32];
char sNumber[8];
int i = 1;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
Menu hMenu = new Menu(
TyMenuGage
);
Menu hMenu = new Menu(
MenuHandler_Gage
);
hMenu.SetTitle("1 week block chat");
hMenu.SetTitle("1 week block chat");
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
while (i <= MaxClients)
while (i <= MaxClients)
{
if (IsClientInGame(i) && !IsFakeClient(i))
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (
client != i)
if (
IsClientInGame(i) && !IsFakeClient(i))
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GetClientName(i, sName, sizeof(sName)-12);
if (client != i)
Format(sNumber, sizeof(sNumber)-1, "%d", i);
{
hMenu.AddItem(sNumber, sName);
GetClientName(i, sName, sizeof(sName)-12);
Format(sNumber, sizeof(sNumber)-1, "%d", i);
hMenu.AddItem(sNumber, sName);
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
i += 1;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
i += 1
;
hMenu.ExitButton = false;
hMenu.Display(client, 20)
;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
Text moved with changes to lines 182-184 (98.3% similarity)
hMenu.ExitButton = false;
hMenu.Display(client, 20);
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return Plugin_Handled;
return Plugin_Handled;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
int
Ty
ClientTimeMute(int &client, int iTime)
int
Hx
ClientTimeMute(int &client, int iTime)
{
{
if (IsClientInGame(client))
if (IsClientInGame(client))
{
{
char sName[32];
char sName[32];
char sTeamID[24];
char sTeamID[24];
KeyValues hGM = new KeyValues("gagmute");
KeyValues hGM = new KeyValues("gagmute");
hGM.ImportFromFile(sg_fileTxt);
hGM.ImportFromFile(sg_fileTxt);
GetClientName(client, sName, sizeof(sName)-12);
GetClientName(client, sName, sizeof(sName)-12);
GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1);
GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1);
if (!hGM.JumpToKey(sTeamID))
if (!hGM.JumpToKey(sTeamID))
{
{
hGM.JumpToKey(sTeamID, true);
hGM.JumpToKey(sTeamID, true);
}
}
int iTimeMute = GetTime() + (iTime * 60);
int iTimeMute = GetTime() + (iTime * 60);
hGM.SetString("Name", sName);
hGM.SetString("Name", sName);
hGM.SetNum("mute", iTimeMute);
hGM.SetNum("mute", iTimeMute);
hGM.Rewind();
hGM.Rewind();
hGM.ExportToFile(sg_fileTxt);
hGM.ExportToFile(sg_fileTxt);
delete hGM;
delete hGM;
ServerCommand("sm_mute #%d", GetClientUserId(client));
ServerCommand("sm_mute #%d", GetClientUserId(client));
return 1;
return 1;
}
}
return 0;
return 0;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public int
TyMenuMute
(Menu menu, MenuAction action, int param1, int param2)
public int
MenuHandler_Mute
(Menu menu, MenuAction action, int param1, int param2)
{
{
if (action == MenuAction_Select)
if (action == MenuAction_Select)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char
i
nfo[
16
];
char
sI
nfo[
8
];
bool found = menu.GetItem(param2,
i
nfo, sizeof(
i
nfo)-1);
bool found = menu.GetItem(param2,
sI
nfo, sizeof(
sI
nfo)-1);
if (found && param1)
if (found && param1)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
int client = StringToInt(
i
nfo);
int client = StringToInt(
sI
nfo);
if (client > 0)
if (client > 0)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (
Ty
ClientTimeMute(client, 60*24*7))
if (
Hx
ClientTimeMute(client, 60*24*7))
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
PrintToChatAll("\x0
4
%d
\x05Min
mute
\x04
%N.\n
", 60*24*7, client);
LogToFileEx(sg_log, "Mute: %N -> %N", param1, client);
PrintToChatAll("\x0
5
%d
min
mute
:
\x04
%N
", 60*24*7, client);
}
}
}
}
}
}
}
}
if (action == MenuAction_End)
if (action == MenuAction_End)
{
{
delete menu;
delete menu;
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public Action CMD_
tymute
(int client, int args)
public Action CMD_
addmute
(int client, int args)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (client
&& IsClientInGame(client)
)
if (client
)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char sName[32];
if (IsClientInGame(client))
char sNumber[8];
{
int i = 1;
char sName[32];
char sNumber[8];
int i = 1;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
Menu hMenu = new Menu(
TyMenuMute
);
Menu hMenu = new Menu(
MenuHandler_Mute
);
hMenu.SetTitle("1 week block microphone");
hMenu.SetTitle("1 week block microphone");
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
while (i <= MaxClients)
while (i <= MaxClients)
{
if (IsClientInGame(i) && !IsFakeClient(i))
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (
client != i)
if (
IsClientInGame(i) && !IsFakeClient(i))
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
GetClientName(i, sName, sizeof(sName)-12);
if (client != i)
Format(sNumber, sizeof(sNumber)-1, "%d", i);
{
hMenu.AddItem(sNumber, sName);
GetClientName(i, sName, sizeof(sName)-12);
Format(sNumber, sizeof(sNumber)-1, "%d", i);
hMenu.AddItem(sNumber, sName);
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
i += 1;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
i += 1
;
hMenu.ExitButton = false;
hMenu.Display(client, 20)
;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
hMenu.ExitButton = false;
hMenu.Display(client, 20);
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return Plugin_Handled;
return Plugin_Handled;
}
}
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
/** * * ============================================================================= * 2 week gag & mute & ban * MAKS steamcommunity.com/profiles/76561198025355822/ * dr lex steamcommunity.com/profiles/76561198008545221/ * ============================================================================= * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, version 3.0, as published by the * Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. * * As a special exception, AlliedModders LLC gives you permission to link the * code of this program (as well as its derivative works) to "Half-Life 2," the * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software * by the Valve Corporation. You must obey the GNU General Public License in * all respects for all other code used. Additionally, AlliedModders LLC grants * this exception to all derivative works. AlliedModders LLC defines further * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), * or <http://www.sourcemod.net/license.php>. * */ #pragma semicolon 1 #include <sourcemod> #include <sdktools> #pragma newdecls required char sg_fileTxt[160]; public Plugin myinfo = { name = "gagmute", author = "MAKS & dr lex", description = "2 week gag & mute", version = "1.1", url = "forums.alliedmods.net/showthread.php?p=2347844" }; public void OnPluginStart() { RegAdminCmd("sm_addban", CMD_tyban, ADMFLAG_BAN, ""); RegAdminCmd("sm_addgag", CMD_tygag, ADMFLAG_CHAT, ""); RegAdminCmd("sm_addmute", CMD_tymute, ADMFLAG_CHAT, ""); BuildPath(Path_SM, sg_fileTxt, sizeof(sg_fileTxt)-1, "data/gagmute.txt"); } void TyClientGagMuteBan(int client) { KeyValues hGM = new KeyValues("gagmute"); if (hGM.ImportFromFile(sg_fileTxt)) { char sTeamID[24]; GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1); if (hGM.JumpToKey(sTeamID)) { int iMute = hGM.GetNum("mute", 0); int iGag = hGM.GetNum("gag", 0); int iBan = hGM.GetNum("ban", 0); delete hGM; int iTime = GetTime(); if (iMute > iTime) { ServerCommand("sm_mute #%d", GetClientUserId(client)); } if (iGag > iTime) { ServerCommand("sm_gag #%d", GetClientUserId(client)); } if (iBan > iTime) { char sTime[24]; FormatTime(sTime, sizeof(sTime)-1, "%Y-%m-%d %H:%M:%S", iBan); KickClient(client,"Banned (%s)", sTime); } } } } public void OnClientPostAdminCheck(int client) { if (!IsFakeClient(client)) { TyClientGagMuteBan(client); } } int TyClientTimeBan(int &client, int iTime) { if (IsClientInGame(client)) { char sName[32]; char sTeamID[24]; KeyValues hGM = new KeyValues("gagmute"); hGM.ImportFromFile(sg_fileTxt); GetClientName(client, sName, sizeof(sName)-12); GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1); if (!hGM.JumpToKey(sTeamID)) { hGM.JumpToKey(sTeamID, true); } int iTimeBan = GetTime() + (iTime * 60); hGM.SetString("Name", sName); hGM.SetNum("ban", iTimeBan); hGM.Rewind(); hGM.ExportToFile(sg_fileTxt); delete hGM; return 1; } return 0; } public int TyMenuBan(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_Select) { char info[16]; bool found = menu.GetItem(param2, info, sizeof(info)-1); if (found && param1) { int client = StringToInt(info); if (client > 0) { if (TyClientTimeBan(client, 60*24*7)) { PrintToChatAll("\x04%d \x05Min ban \x04%N.\n", 60*24*7, client); KickClient(client, "%d Min ban.", 60*24*7); } } } } if (action == MenuAction_End) { delete menu; } } public Action CMD_tyban(int client, int args) { if (args) { char sArg[8]; GetCmdArg(1, sArg, sizeof(sArg)-1); int iArg = StringToInt(sArg); if (iArg > 0 && iArg < 33) { if (IsClientInGame(iArg)) { int iTime = 60*24; if (args > 1) { char sTime[20]; GetCmdArg(2, sTime, sizeof(sTime)-1); iTime = StringToInt(sTime); } if (TyClientTimeBan(client, iTime)) { PrintToChatAll("\x04%d \x05Min ban \x04%N.\n", iTime, client); KickClient(client, "%d Min ban.", iTime); } } } } else { if (client) { if (IsClientInGame(client)) { char sName[32]; char sNumber[8]; int i = 1; Menu hMenu = new Menu(TyMenuBan); hMenu.SetTitle("1 week ban player"); while (i <= MaxClients) { if (IsClientInGame(i) && !IsFakeClient(i)) { if (client != i) { GetClientName(i, sName, sizeof(sName)-12); Format(sNumber, sizeof(sNumber)-1, "%d", i); hMenu.AddItem(sNumber, sName); } } i += 1; } hMenu.ExitButton = false; hMenu.Display(client, 20); } } } return Plugin_Handled; } int TyClientTimeGag(int &client, int iTime) { if (IsClientInGame(client)) { char sName[32]; char sTeamID[24]; KeyValues hGM = new KeyValues("gagmute"); hGM.ImportFromFile(sg_fileTxt); GetClientName(client, sName, sizeof(sName)-12); GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1); if (!hGM.JumpToKey(sTeamID)) { hGM.JumpToKey(sTeamID, true); } int iTimeGag = GetTime() + (iTime * 60); hGM.SetString("Name", sName); hGM.SetNum("gag", iTimeGag); hGM.Rewind(); hGM.ExportToFile(sg_fileTxt); delete hGM; ServerCommand("sm_gag #%d", GetClientUserId(client)); return 1; } return 0; } public int TyMenuGage(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_Select) { char info[16]; bool found = menu.GetItem(param2, info, sizeof(info)-1); if (found && param1) { int client = StringToInt(info); if (client > 0) { if (TyClientTimeGag(client, 60*24*7)) { PrintToChatAll("\x04%d \x05Min gage \x04%N.\n", 60*24*7, client); } } } } if (action == MenuAction_End) { delete menu; } } public Action CMD_tygag(int client, int args) { if (client && IsClientInGame(client)) { char sName[32]; char sNumber[8]; int i = 1; Menu hMenu = new Menu(TyMenuGage); hMenu.SetTitle("1 week block chat"); while (i <= MaxClients) { if (IsClientInGame(i) && !IsFakeClient(i)) { if (client != i) { GetClientName(i, sName, sizeof(sName)-12); Format(sNumber, sizeof(sNumber)-1, "%d", i); hMenu.AddItem(sNumber, sName); } } i += 1; } hMenu.ExitButton = false; hMenu.Display(client, 20); } return Plugin_Handled; } int TyClientTimeMute(int &client, int iTime) { if (IsClientInGame(client)) { char sName[32]; char sTeamID[24]; KeyValues hGM = new KeyValues("gagmute"); hGM.ImportFromFile(sg_fileTxt); GetClientName(client, sName, sizeof(sName)-12); GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1); if (!hGM.JumpToKey(sTeamID)) { hGM.JumpToKey(sTeamID, true); } int iTimeMute = GetTime() + (iTime * 60); hGM.SetString("Name", sName); hGM.SetNum("mute", iTimeMute); hGM.Rewind(); hGM.ExportToFile(sg_fileTxt); delete hGM; ServerCommand("sm_mute #%d", GetClientUserId(client)); return 1; } return 0; } public int TyMenuMute(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_Select) { char info[16]; bool found = menu.GetItem(param2, info, sizeof(info)-1); if (found && param1) { int client = StringToInt(info); if (client > 0) { if (TyClientTimeMute(client, 60*24*7)) { PrintToChatAll("\x04%d \x05Min mute \x04%N.\n", 60*24*7, client); } } } } if (action == MenuAction_End) { delete menu; } } public Action CMD_tymute(int client, int args) { if (client && IsClientInGame(client)) { char sName[32]; char sNumber[8]; int i = 1; Menu hMenu = new Menu(TyMenuMute); hMenu.SetTitle("1 week block microphone"); while (i <= MaxClients) { if (IsClientInGame(i) && !IsFakeClient(i)) { if (client != i) { GetClientName(i, sName, sizeof(sName)-12); Format(sNumber, sizeof(sNumber)-1, "%d", i); hMenu.AddItem(sNumber, sName); } } i += 1; } hMenu.ExitButton = false; hMenu.Display(client, 20); } return Plugin_Handled; }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
/** * ============================================================================= * 1 week gag & mute & ban * MAKS steamcommunity.com/profiles/76561198025355822/ * dr lex steamcommunity.com/profiles/76561198008545221/ * ============================================================================= * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, version 3.0, as published by the * Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <www.gnu.org/licenses/>. * * As a special exception, AlliedModders LLC gives you permission to link the * code of this program (as well as its derivative works) to "Half-Life 2," the * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software * by the Valve Corporation. You must obey the GNU General Public License in * all respects for all other code used. Additionally, AlliedModders LLC grants * this exception to all derivative works. AlliedModders LLC defines further * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), * or <www.sourcemod.net/license.php>. * */ #pragma semicolon 1 #include <sourcemod> #include <sdktools> #pragma newdecls required char sg_fileTxt[160]; char sg_log[160]; public Plugin myinfo = { name = "gagmute", author = "MAKS & dr lex", description = "gag & mute & ban", version = "1.3", url = "forums.alliedmods.net/showthread.php?p=2347844" }; public void OnPluginStart() { RegAdminCmd("sm_addban", CMD_addban, ADMFLAG_BAN, ""); RegAdminCmd("sm_addgag", CMD_addgag, ADMFLAG_CHAT, ""); RegAdminCmd("sm_addmute", CMD_addmute, ADMFLAG_CHAT, ""); BuildPath(Path_SM, sg_fileTxt, sizeof(sg_fileTxt)-1, "data/GagMuteBan.txt"); BuildPath(Path_SM, sg_log, sizeof(sg_log)-1, "logs/GagMuteBan.log"); } void HxClientGagMuteBan(int &client) { KeyValues hGM = new KeyValues("gagmute"); if (hGM.ImportFromFile(sg_fileTxt)) { char sTeamID[24]; GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1); if (hGM.JumpToKey(sTeamID)) { int iMute = hGM.GetNum("mute", 0); int iGag = hGM.GetNum("gag", 0); int iBan = hGM.GetNum("ban", 0); int iTime = GetTime(); if (iMute > iTime) { ServerCommand("sm_mute #%d", GetClientUserId(client)); } if (iGag > iTime) { ServerCommand("sm_gag #%d", GetClientUserId(client)); } if (iBan > iTime) { char sTime[24]; FormatTime(sTime, sizeof(sTime)-1, "%Y-%m-%d %H:%M:%S", iBan); KickClient(client,"Banned (%s)", sTime); } } delete hGM; } } public void OnClientPostAdminCheck(int client) { if (!IsFakeClient(client)) { HxClientGagMuteBan(client); } } int HxClientTimeBan(int &client, int iTime) { if (IsClientInGame(client)) { char sName[32]; char sTeamID[24]; KeyValues hGM = new KeyValues("gagmute"); hGM.ImportFromFile(sg_fileTxt); GetClientName(client, sName, sizeof(sName)-12); GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1); if (!hGM.JumpToKey(sTeamID)) { hGM.JumpToKey(sTeamID, true); } int iTimeBan = GetTime() + (iTime * 60); hGM.SetString("Name", sName); hGM.SetNum("ban", iTimeBan); hGM.Rewind(); hGM.ExportToFile(sg_fileTxt); delete hGM; return 1; } return 0; } public int MenuHandler_Ban(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_Select) { char sInfo[8]; bool found = menu.GetItem(param2, sInfo, sizeof(sInfo)-1); if (found && param1) { int client = StringToInt(sInfo); if (client > 0) { if (HxClientTimeBan(client, 60*24*7)) { LogToFileEx(sg_log, "Ban: %N -> %N", param1, client); PrintToChatAll("\x05%d min ban:\x04 %N", 60*24*7, client); KickClient(client, "%d Min ban.", 60*24*7); } } } } if (action == MenuAction_End) { delete menu; } } public Action CMD_addban(int client, int args) { if (client) { if (IsClientInGame(client)) { char sName[32]; char sNumber[8]; int i = 1; Menu hMenu = new Menu(MenuHandler_Ban); hMenu.SetTitle("1 week ban player"); while (i <= MaxClients) { if (IsClientInGame(i) && !IsFakeClient(i)) { if (client != i) { GetClientName(i, sName, sizeof(sName)-12); Format(sNumber, sizeof(sNumber)-1, "%d", i); hMenu.AddItem(sNumber, sName); } } i += 1; } hMenu.ExitButton = false; hMenu.Display(client, 20); } } return Plugin_Handled; } int HxClientTimeGag(int &client, int iTime) { if (IsClientInGame(client)) { char sName[32]; char sTeamID[24]; KeyValues hGM = new KeyValues("gagmute"); hGM.ImportFromFile(sg_fileTxt); GetClientName(client, sName, sizeof(sName)-12); GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1); if (!hGM.JumpToKey(sTeamID)) { hGM.JumpToKey(sTeamID, true); } int iTimeGag = GetTime() + (iTime * 60); hGM.SetString("Name", sName); hGM.SetNum("gag", iTimeGag); hGM.Rewind(); hGM.ExportToFile(sg_fileTxt); delete hGM; ServerCommand("sm_gag #%d", GetClientUserId(client)); return 1; } return 0; } public int MenuHandler_Gage(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_Select) { char sInfo[8]; bool found = menu.GetItem(param2, sInfo, sizeof(sInfo)-1); if (found && param1) { int client = StringToInt(sInfo); if (client > 0) { if (HxClientTimeGag(client, 60*24*7)) { LogToFileEx(sg_log, "Gage: %N -> %N", param1, client); PrintToChatAll("\x05%d min gage:\x04 %N", 60*24*7, client); } } } } if (action == MenuAction_End) { delete menu; } } public Action CMD_addgag(int client, int args) { if (client) { if (IsClientInGame(client)) { char sName[32]; char sNumber[8]; int i = 1; Menu hMenu = new Menu(MenuHandler_Gage); hMenu.SetTitle("1 week block chat"); while (i <= MaxClients) { if (IsClientInGame(i) && !IsFakeClient(i)) { if (client != i) { GetClientName(i, sName, sizeof(sName)-12); Format(sNumber, sizeof(sNumber)-1, "%d", i); hMenu.AddItem(sNumber, sName); } } i += 1; } hMenu.ExitButton = false; hMenu.Display(client, 20); } } return Plugin_Handled; } int HxClientTimeMute(int &client, int iTime) { if (IsClientInGame(client)) { char sName[32]; char sTeamID[24]; KeyValues hGM = new KeyValues("gagmute"); hGM.ImportFromFile(sg_fileTxt); GetClientName(client, sName, sizeof(sName)-12); GetClientAuthId(client, AuthId_Steam2, sTeamID, sizeof(sTeamID)-1); if (!hGM.JumpToKey(sTeamID)) { hGM.JumpToKey(sTeamID, true); } int iTimeMute = GetTime() + (iTime * 60); hGM.SetString("Name", sName); hGM.SetNum("mute", iTimeMute); hGM.Rewind(); hGM.ExportToFile(sg_fileTxt); delete hGM; ServerCommand("sm_mute #%d", GetClientUserId(client)); return 1; } return 0; } public int MenuHandler_Mute(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_Select) { char sInfo[8]; bool found = menu.GetItem(param2, sInfo, sizeof(sInfo)-1); if (found && param1) { int client = StringToInt(sInfo); if (client > 0) { if (HxClientTimeMute(client, 60*24*7)) { LogToFileEx(sg_log, "Mute: %N -> %N", param1, client); PrintToChatAll("\x05%d min mute:\x04 %N", 60*24*7, client); } } } } if (action == MenuAction_End) { delete menu; } } public Action CMD_addmute(int client, int args) { if (client) { if (IsClientInGame(client)) { char sName[32]; char sNumber[8]; int i = 1; Menu hMenu = new Menu(MenuHandler_Mute); hMenu.SetTitle("1 week block microphone"); while (i <= MaxClients) { if (IsClientInGame(i) && !IsFakeClient(i)) { if (client != i) { GetClientName(i, sName, sizeof(sName)-12); Format(sNumber, sizeof(sNumber)-1, "%d", i); hMenu.AddItem(sNumber, sName); } } i += 1; } hMenu.ExitButton = false; hMenu.Display(client, 20); } } return Plugin_Handled; }
अंतर खोजें