AlliedModders Donor
|
01-22-2014
, 23:04
Re: [CS:GO] Deathmatch Goes Advanced (v0.3, 2014-01-21)
|
#19
|
Yeah he ripped out the c4 removal procedure in SniperUK's version.
If you want the removal of the c4 back in:
Edit the deathmatch.sp
Find:
Spoiler
PHP Code:
if (g_bConfig_Enabled) { if (g_iConfig_GunMenuMode != old_gunMenuMode) { if (g_iConfig_GunMenuMode != 1) { menus_Close(); } } SetGrenadeState(); } }
Replace with
Spoiler
PHP Code:
if (g_bConfig_Enabled) { if (g_iConfig_GunMenuMode != old_gunMenuMode) { if (g_iConfig_GunMenuMode != 1) { menus_Close(); } } if (g_bConfig_RemoveObjectives) RemoveC4(); SetGrenadeState(); } }
Find:
Spoiler
PHP Code:
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { if (g_bConfig_Enabled) { if (g_bConfig_RemoveObjectives) RemoveHostages(); } return Plugin_Continue; }
Replace:
Spoiler
PHP Code:
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { if (g_bConfig_Enabled) { if (g_bConfig_RemoveObjectives) RemoveHostages(); if (g_bConfig_RemoveObjectives) RemoveC4(); } return Plugin_Continue; }
Spoiler
PHP Code:
RemoveC4() { for (new i = 1; i <= MaxClients; i++) { if (StripC4(i)) break; } }
bool:StripC4(clientIndex) { if (IsClientInGame(clientIndex) && (Teams:GetClientTeam(clientIndex) == TeamT) && IsPlayerAlive(clientIndex)) { new c4Index = GetPlayerWeaponSlot(clientIndex, _:SlotC4); if (c4Index != -1) { decl String:weapon[24]; GetClientWeapon(clientIndex, weapon, sizeof(weapon)); // If the player is holding C4, switch to the best weapon before removing it. if (StrEqual(weapon, "weapon_c4")) { if (GetPlayerWeaponSlot(clientIndex, _:SlotPrimary) != -1) ClientCommand(clientIndex, "slot1"); else if (GetPlayerWeaponSlot(clientIndex, _:SlotSecondary) != -1) ClientCommand(clientIndex, "slot2"); else ClientCommand(clientIndex, "slot3"); } RemovePlayerItem(clientIndex, c4Index); AcceptEntityInput(c4Index, "Kill"); return true; } } return false; }
In players.sp
Find
Spoiler
PHP Code:
public Action:players_Timer_OnClientSpawn(Handle:timer, any:clientRef) { new clientIndex = EntRefToEntIndex(clientRef);
if (players_IsClientValid(clientIndex) && IsClientInGame(clientIndex) && IsPlayerAlive(clientIndex)) { // Set health. SetEntityHealth(clientIndex, g_iConfig_StartHP); // Give equipment if (g_bConfig_Armour) SetEntData(clientIndex, g_iPlayers_ArmourOffset, 100); else SetEntData(clientIndex, g_iPlayers_ArmourOffset, 0); if (g_bConfig_Helmet) SetEntData(clientIndex, g_iPlayers_HelmetOffset, 1); else SetEntData(clientIndex, g_iPlayers_HelmetOffset, 0); // Hide Radar if (g_bConfig_HideRadar) SetEntProp(clientIndex, Prop_Send, "m_iHideHUD", HIDEHUD_RADAR); if (g_bPlayers_FirstWeaponSelection[clientIndex]) menus_OnClientSpawn(clientIndex); else players_GiveWeapons(clientIndex, true, true); } }
Replace
Spoiler
PHP Code:
public Action:players_Timer_OnClientSpawn(Handle:timer, any:clientRef) { new clientIndex = EntRefToEntIndex(clientRef);
if (players_IsClientValid(clientIndex) && IsClientInGame(clientIndex) && IsPlayerAlive(clientIndex)) { // Set health. SetEntityHealth(clientIndex, g_iConfig_StartHP); // Give equipment if (g_bConfig_Armour) SetEntData(clientIndex, g_iPlayers_ArmourOffset, 100); else SetEntData(clientIndex, g_iPlayers_ArmourOffset, 0); if (g_bConfig_Helmet) SetEntData(clientIndex, g_iPlayers_HelmetOffset, 1); else SetEntData(clientIndex, g_iPlayers_HelmetOffset, 0); // Hide Radar if (g_bConfig_HideRadar) SetEntProp(clientIndex, Prop_Send, "m_iHideHUD", HIDEHUD_RADAR); if (g_bPlayers_FirstWeaponSelection[clientIndex]) menus_OnClientSpawn(clientIndex); else players_GiveWeapons(clientIndex, true, true); if (g_bConfig_RemoveObjectives) StripC4(clientIndex); } }
|
|