|
13 | 13 | #define TEAM_SPEC 1 |
14 | 14 | #define TEAM_T 2 |
15 | 15 | #define TEAM_CT 3 |
16 | | -#define HIDEHUD_CHAT ( 1<<7 ) |
| 16 | +#define HIDEHUD_CHAT ( 1<<7 ) |
17 | 17 |
|
18 | 18 | ConVar g_enable; |
19 | 19 | ConVar g_knifesound; |
20 | 20 | ConVar g_hurtound; |
21 | 21 | ConVar g_shieldsound; |
| 22 | +ConVar g_deathsound; |
22 | 23 | ConVar g_balance; |
23 | 24 | ConVar g_msgsshorthanded; |
24 | 25 | ConVar g_radar; |
@@ -60,6 +61,14 @@ ConVar g_ConVarEnable; |
60 | 61 | ConVar g_ConVarMethod; |
61 | 62 | ConVar g_ConVarDelay; |
62 | 63 | ConVar g_ConVarHibernate; |
| 64 | +ConVar gcv_force = null; |
| 65 | +ConVar gcv_force2 = null; |
| 66 | +ConVar gcv_force3 = null; |
| 67 | +ConVar gcv_force4 = null; |
| 68 | +ConVar gcv_force5 = null; |
| 69 | +ConVar gcv_force6 = null; |
| 70 | +ConVar gcv_force7 = null; |
| 71 | +ConVar gcv_force8 = null; |
63 | 72 |
|
64 | 73 | int g_MapPos; |
65 | 74 | int g_MapListSerial; |
@@ -125,6 +134,7 @@ bool g_bblockroundendsound = false; |
125 | 134 | bool g_bblockroundendpanel = false; |
126 | 135 | bool g_bblockradiostartround = false; |
127 | 136 | bool g_bblockfalldamage = false; |
| 137 | +bool g_bdeathsound = false; |
128 | 138 |
|
129 | 139 | float g_ListX; |
130 | 140 | float g_ListY; |
@@ -235,7 +245,7 @@ public Plugin myinfo = |
235 | 245 | name = "[CS:GO] Game Manager", |
236 | 246 | author = "Gold_KingZ", |
237 | 247 | description = "Game Manager ( Hide radar, money, messages, ping, and more )", |
238 | | - version = "1.0.8", |
| 248 | + version = "1.0.9", |
239 | 249 | url = "https://steamcommunity.com/id/oQYh" |
240 | 250 | } |
241 | 251 |
|
@@ -291,6 +301,7 @@ public void OnPluginStart() |
291 | 301 | g_knifesound = CreateConVar("gm_block_knife_sound", "0", "Block Knife Damage Sounds (Need To Enable gm_enable_hide_and_block) || 1= Yes || 0= No", _, true, 0.0, true, 1.0); |
292 | 302 | g_hurtound = CreateConVar("gm_block_hurthealth_sound", "0", "Block Hurt Health Damage Sound (Need To Enable gm_enable_hide_and_block) || 1= Yes || 0= No", _, true, 0.0, true, 1.0); |
293 | 303 | g_shieldsound = CreateConVar("gm_block_hurtshield_sound", "0", "Block Hurt Shield Damage Sound (Need To Enable gm_enable_hide_and_block) || 1= Yes || 0= No", _, true, 0.0, true, 1.0); |
| 304 | + g_deathsound = CreateConVar("gm_block_death_sound", "0", "Block Death Sound (Need To Enable gm_enable_hide_and_block) || 1= Yes || 0= No", _, true, 0.0, true, 1.0); |
294 | 305 | Cvar_ListX = CreateConVar("gm_hud_xaxis" , "0.00", "X-Axis Location From 0 To 1.0 Check https://github.com/oqyh/Game-Manager/blob/main/images/hud%20postions.png For Help"); |
295 | 306 | Cvar_ListY = CreateConVar("gm_hud_yaxis" , "0.35", "Y-Axis Location From 0 To 1.0 Check https://github.com/oqyh/Game-Manager/blob/main/images/hud%20postions.png For Help"); |
296 | 307 | Cvar_ListColor = CreateConVar("gm_hud_colors" , "255 0 189 0.8", "Hud color. [R G B A] Pick Colors https://rgbacolorpicker.com/"); |
@@ -345,6 +356,7 @@ public void OnPluginStart() |
345 | 356 | HookConVarChange(g_knifesound, OnSettingsChanged); |
346 | 357 | HookConVarChange(g_hurtound, OnSettingsChanged); |
347 | 358 | HookConVarChange(g_shieldsound, OnSettingsChanged); |
| 359 | + HookConVarChange(g_deathsound, OnSettingsChanged); |
348 | 360 | HookConVarChange(g_msgsshorthanded, OnSettingsChanged); |
349 | 361 | HookConVarChange(g_radar, OnSettingsChanged); |
350 | 362 | HookConVarChange(g_balance, OnSettingsChanged); |
@@ -391,10 +403,30 @@ public void OnPluginStart() |
391 | 403 | AddNormalSoundHook(Call_Back_Soundss); |
392 | 404 | AddNormalSoundHook(Call_Back_Soundsss); |
393 | 405 | AddNormalSoundHook(Call_Back_NadeSounds); |
| 406 | + AddNormalSoundHook(Call_Back_DeathSound); |
394 | 407 |
|
395 | 408 | g_eenable = GetConVarBool(g_enable); |
396 | 409 | HookConVarChange(g_enable, CvarChanged); |
397 | 410 |
|
| 411 | + gcv_force = FindConVar("sv_disable_radar"); |
| 412 | + gcv_force.AddChangeHook(Onchanged); |
| 413 | + |
| 414 | + gcv_force2 = FindConVar("mp_playercashawards"); |
| 415 | + gcv_force2.AddChangeHook(Onchanged2); |
| 416 | + gcv_force3 = FindConVar("mp_teamcashawards"); |
| 417 | + gcv_force3.AddChangeHook(Onchanged2); |
| 418 | + |
| 419 | + gcv_force4 = FindConVar("cash_team_bonus_shorthanded"); |
| 420 | + gcv_force4.AddChangeHook(Onchanged3); |
| 421 | + |
| 422 | + gcv_force5 = FindConVar("sv_falldamage_scale"); |
| 423 | + gcv_force5.AddChangeHook(Onchanged4); |
| 424 | + gcv_force6 = FindConVar("sv_min_jump_landing_sound"); |
| 425 | + gcv_force6.AddChangeHook(Onchanged5); |
| 426 | + gcv_force7 = FindConVar("sv_footsteps"); |
| 427 | + gcv_force7.AddChangeHook(Onchanged6); |
| 428 | + gcv_force8 = FindConVar("sv_mute_players_with_social_penalties"); |
| 429 | + gcv_force8.AddChangeHook(Onchanged7); |
398 | 430 |
|
399 | 431 | g_botQuota = GetConVarInt(g_Cvar_BotQuota); |
400 | 432 | HookConVarChange(g_Cvar_BotQuota, CvarChanged); |
@@ -441,6 +473,95 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max |
441 | 473 | return APLRes_Success; |
442 | 474 | } |
443 | 475 |
|
| 476 | +public void Onchanged(ConVar convar, const char[] oldValue, const char[] newValue) |
| 477 | +{ |
| 478 | + if( g_benable == true) |
| 479 | + { |
| 480 | + if(g_bradar == true) |
| 481 | + { |
| 482 | + if (StringToInt(newValue) != 1) { |
| 483 | + gcv_force.IntValue = 1; |
| 484 | + } |
| 485 | + } |
| 486 | + } |
| 487 | +} |
| 488 | +public void Onchanged2(ConVar convar, const char[] oldValue, const char[] newValue) |
| 489 | +{ |
| 490 | + if( g_benable == true) |
| 491 | + { |
| 492 | + if(g_bmoneyhud == true) |
| 493 | + { |
| 494 | + if (StringToInt(newValue) != 0) { |
| 495 | + gcv_force2.IntValue = 0; |
| 496 | + } |
| 497 | + |
| 498 | + if (StringToInt(newValue) != 0) { |
| 499 | + gcv_force3.IntValue = 0; |
| 500 | + } |
| 501 | + } |
| 502 | + } |
| 503 | +} |
| 504 | + |
| 505 | +public void Onchanged3(ConVar convar, const char[] oldValue, const char[] newValue) |
| 506 | +{ |
| 507 | + if( g_benable == true) |
| 508 | + { |
| 509 | + if (g_msgsshorthanded.IntValue == 1) |
| 510 | + { |
| 511 | + if (StringToInt(newValue) != 0) { |
| 512 | + gcv_force4.IntValue = 0; |
| 513 | + } |
| 514 | + } |
| 515 | + } |
| 516 | +} |
| 517 | +public void Onchanged4(ConVar convar, const char[] oldValue, const char[] newValue) |
| 518 | +{ |
| 519 | + if( g_benable == true) |
| 520 | + { |
| 521 | + if( g_bblockfalldamage == true) |
| 522 | + { |
| 523 | + if (StringToInt(newValue) != 0) { |
| 524 | + gcv_force5.IntValue = 0; |
| 525 | + } |
| 526 | + } |
| 527 | + } |
| 528 | +} |
| 529 | +public void Onchanged5(ConVar convar, const char[] oldValue, const char[] newValue) |
| 530 | +{ |
| 531 | + if( g_benable == true) |
| 532 | + { |
| 533 | + if( g_bblockjumpland == true) |
| 534 | + { |
| 535 | + if (StringToInt(newValue) != 999999) { |
| 536 | + gcv_force6.IntValue = 999999; |
| 537 | + } |
| 538 | + } |
| 539 | + } |
| 540 | +} |
| 541 | +public void Onchanged6(ConVar convar, const char[] oldValue, const char[] newValue) |
| 542 | +{ |
| 543 | + if( g_benable == true) |
| 544 | + { |
| 545 | + if( g_bblockfootsteps == true) |
| 546 | + { |
| 547 | + if (StringToInt(newValue) != 0) { |
| 548 | + gcv_force7.IntValue = 0; |
| 549 | + } |
| 550 | + } |
| 551 | + } |
| 552 | +} |
| 553 | +public void Onchanged7(ConVar convar, const char[] oldValue, const char[] newValue) |
| 554 | +{ |
| 555 | + if( g_benable == true) |
| 556 | + { |
| 557 | + if( g_bblockautomute == true) |
| 558 | + { |
| 559 | + if (StringToInt(newValue) != 0) { |
| 560 | + gcv_force8.IntValue = 0; |
| 561 | + } |
| 562 | + } |
| 563 | + } |
| 564 | +} |
444 | 565 |
|
445 | 566 | public int OnSettingsChanged(Handle convar, const char[] oldValue, const char[] newValue) |
446 | 567 | { |
@@ -489,6 +610,10 @@ public int OnSettingsChanged(Handle convar, const char[] oldValue, const char[] |
489 | 610 | g_bshieldsound = g_shieldsound.BoolValue; |
490 | 611 | } |
491 | 612 |
|
| 613 | + if(convar == g_deathsound) |
| 614 | + { |
| 615 | + g_bdeathsound = g_deathsound.BoolValue; |
| 616 | + } |
492 | 617 | if(convar == g_blockradioagent) |
493 | 618 | { |
494 | 619 | g_bblockradioagent = g_blockradioagent.BoolValue; |
@@ -654,6 +779,7 @@ public void OnConfigsExecuted() |
654 | 779 | g_bknifesound = GetConVarBool(g_knifesound); |
655 | 780 | g_bhurtound = GetConVarBool(g_hurtound); |
656 | 781 | g_bshieldsound = GetConVarBool(g_shieldsound); |
| 782 | + g_bdeathsound = GetConVarBool(g_deathsound); |
657 | 783 | g_bradar = GetConVarBool(g_radar); |
658 | 784 | g_bbalance = GetConVarBool(g_balance); |
659 | 785 | g_bmoneyhud = GetConVarBool(g_moneyhud); |
@@ -907,7 +1033,18 @@ public Action Call_Back_NadeSounds(int clients[64], int &numClients, char sample |
907 | 1033 | { |
908 | 1034 | if (!g_benable || !g_bblockradionade) return Plugin_Continue; |
909 | 1035 |
|
910 | | - if (StrContains(sample, "_decoy") != -1 || StrContains(sample, "_grenade") != -1 || StrContains(sample, "_flashbang") != -1 || StrContains(sample, "_molotov") != -1 || StrContains(sample, "_smoke") != -1) |
| 1036 | + if (StrContains(sample, "ct_decoy") != -1 || StrContains(sample, "ct_grenade") != -1 || StrContains(sample, "ct_flashbang") != -1 || StrContains(sample, "ct_molotov") != -1 || StrContains(sample, "ct_smoke") != -1 || StrContains(sample, "t_decoy") != -1 || StrContains(sample, "t_grenade") != -1 || StrContains(sample, "t_flashbang") != -1 || StrContains(sample, "t_molotov") != -1 || StrContains(sample, "t_smoke") != -1) |
| 1037 | + { |
| 1038 | + return Plugin_Handled; |
| 1039 | + } |
| 1040 | + return Plugin_Continue; |
| 1041 | +} |
| 1042 | + |
| 1043 | +public Action Call_Back_DeathSound(int clients[64], int &numClients, char sample[PLATFORM_MAX_PATH], int &client, int &channel, float &volume, int &level, int &pitch, int &flags) |
| 1044 | +{ |
| 1045 | + if (!g_benable || !g_bdeathsound) return Plugin_Continue; |
| 1046 | + |
| 1047 | + if (StrContains(sample, "death1") != -1 || StrContains(sample, "death2") != -1 || StrContains(sample, "death3") != -1 || StrContains(sample, "death4") != -1 || StrContains(sample, "death5") != -1 || StrContains(sample, "death6") != -1) |
911 | 1048 | { |
912 | 1049 | return Plugin_Handled; |
913 | 1050 | } |
|
0 commit comments