Skip to content

Commit f63e0c3

Browse files
committed
2
1 parent 34923a1 commit f63e0c3

File tree

3 files changed

+8
-52
lines changed

3 files changed

+8
-52
lines changed

general_insurgency/scripting/adjust_difficulty.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void AdjustDifficulty()
164164
AdjustOutpostDifficulty(security_cnt);
165165
}
166166

167-
PrintToChatAll("请各位玩家注意,因为玩家数量的发生变化(%d人),游戏难度已经改变", security_cnt);
167+
//PrintToChatAll("请各位玩家注意,因为玩家数量的发生变化(%d人),游戏难度已经改变", security_cnt);
168168
}
169169

170170
void AdjustCheckpointDifficulty(int security_cnt)

WIS/scripting/change-level.sp renamed to general_insurgency/scripting/change_level.sp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ void PrepareChangeLevel(char[] levelname)
174174

175175
char hint[64];
176176
FormatEx(hint, sizeof(hint), "服务器将在%.0f秒后将更换地图", g_cvar_delay.FloatValue, levelname);
177-
178177
for (int client = 1; client <= MaxClients; client++)
179178
{
180179
if (!IsClientInGame(client) || IsFakeClient(client))

WIS/scripting/DropWeaponEx.sp renamed to general_insurgency/scripting/drop_weapon.sp

Lines changed: 7 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
/**
2-
* 1.1 添加了丢枪时速度的计算
3-
* 2.0 BOT被击中手臂会掉落武器
4-
* 2.1 修改了检测武器所在槽位的代码
5-
* 添加了输入命令后的反馈提示
6-
* 2.2 底层API改用拓展API
7-
**/
8-
91
#pragma semicolon 1
102
#pragma newdecls required
113

@@ -15,11 +7,11 @@
157

168
#include "INSExtendAPI"
179

18-
#define PLUGIN_NAME "扔枪增强版"
19-
#define PLUGIN_AUTHOR "PakuPaku"
20-
#define PLUGIN_DESCRIPTION "玩家可以扔枪"
21-
#define PLUGIN_VERSION "2.5"
22-
#define PLUGIN_URL "https://github.com/TFXX"
10+
#define PLUGIN_NAME "Drop Weapon"
11+
#define PLUGIN_AUTHOR ""
12+
#define PLUGIN_DESCRIPTION "allow client drop weapon"
13+
#define PLUGIN_VERSION ""
14+
#define PLUGIN_URL ""
2315

2416
public Plugin myinfo =
2517
{
@@ -30,45 +22,17 @@ public Plugin myinfo =
3022
url = PLUGIN_URL
3123
};
3224

33-
ConVar g_cvarLogged;
34-
3525
public void OnPluginStart()
36-
{
37-
PrintToServer("%sV%s]正在加载插件...", PLUGIN_NAME, PLUGIN_VERSION);
38-
39-
InitPluginConvars();
40-
hook_events();
41-
reg_cmds();
42-
43-
PrintToServer("%sV%s]插件加载完成!", PLUGIN_NAME, PLUGIN_VERSION);
44-
}
45-
46-
public void OnPluginEnd()
47-
{
48-
unhook_events();
49-
}
50-
51-
void InitPluginConvars()
52-
{
53-
g_cvarLogged = CreateConVar("sm_drop_weapon_ex_logged", "0", "是否记录", FCVAR_NONE);
54-
AutoExecConfig(true,"plugin.DropWeaponEx");
55-
}
56-
57-
void hook_events()
5826
{
5927
HookEventEx("player_hurt", EVENT_POST_player_hurt, EventHookMode_Post);
28+
RegConsoleCmd("r", CMD_drop_weapon);
6029
}
6130

62-
static void unhook_events()
31+
public void OnPluginEnd()
6332
{
6433
UnhookEvent("player_hurt", EVENT_POST_player_hurt, EventHookMode_Post);
6534
}
6635

67-
static void reg_cmds()
68-
{
69-
RegConsoleCmd("r", CMD_drop_weapon);
70-
}
71-
7236
Action CMD_drop_weapon(int client, int args)
7337
{
7438
if (!IsClientInGame(client))
@@ -127,12 +91,5 @@ Action EVENT_POST_player_hurt(Handle event, const char[] name, bool dontBroadcas
12791
}
12892

12993
SDKHooks_DropWeapon(client, weapon, NULL_VECTOR, NULL_VECTOR);
130-
131-
if (g_cvarLogged.BoolValue)
132-
{
133-
char weaponName[32];
134-
GetEntityClassname(weapon, weaponName, 32);
135-
PrintToServer("%sV%s]%N被击中丢掉了枪%s(%d)", PLUGIN_NAME, PLUGIN_VERSION, client, weaponName, weapon);
136-
}
13794
return Plugin_Continue;
13895
}

0 commit comments

Comments
 (0)