Sort, Remove and Clean.

This commit is contained in:
zaCade
2019-03-02 15:59:17 +01:00
parent bbf3b5bc40
commit 8ab410651e
13 changed files with 34 additions and 2273 deletions
-69
View File
@@ -1,69 +0,0 @@
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>
#define ARMS_MODEL_T "models/weapons/v_models/arms/glove_hardknuckle/v_glove_hardknuckle_black.mdl"
#define ARMS_MODEL_CT "models/weapons/v_models/arms/glove_hardknuckle/v_glove_hardknuckle_black.mdl"
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Plugin myinfo =
{
name = "Fix Invisible Gloves",
author = "zaCade",
description = "Feex more volvo bullshiet!",
version = "1.0.0"
};
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnPluginStart()
{
for (int iClient = 1; iClient <= MaxClients; iClient++)
{
if (IsClientInGame(iClient))
{
OnClientPutInServer(iClient);
}
}
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnMapStart()
{
PrecacheModel(ARMS_MODEL_T);
PrecacheModel(ARMS_MODEL_CT);
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnClientPutInServer(int iClient)
{
SDKHook(iClient, SDKHook_SpawnPost, OnSpawnPost);
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnSpawnPost(int iClient)
{
if(!IsClientInGame(iClient) || IsClientObserver(iClient) || !IsPlayerAlive(iClient))
return;
if (GetEntPropEnt(iClient, Prop_Send, "m_hMyWearables") == INVALID_ENT_REFERENCE)
{
switch(GetClientTeam(iClient))
{
case CS_TEAM_T: SetEntPropString(iClient, Prop_Send, "m_szArmsModel", ARMS_MODEL_T);
case CS_TEAM_CT: SetEntPropString(iClient, Prop_Send, "m_szArmsModel", ARMS_MODEL_CT);
}
}
}
-43
View File
@@ -1,43 +0,0 @@
#pragma newdecls required
#include <sourcemod>
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Plugin myinfo =
{
name = "Force CVars",
author = "zaCade",
description = "Force CVars to specific values.",
version = "1.0.0"
};
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnPluginStart()
{
RegServerCmd("sm_forcevar", Command_ForceCVar);
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Action Command_ForceCVar(int args)
{
char sArguments[2][128];
GetCmdArg(1, sArguments[0], sizeof(sArguments[]));
GetCmdArg(2, sArguments[1], sizeof(sArguments[]));
ConVar CVar;
if ((CVar = FindConVar(sArguments[0])) != null)
{
float fValue = StringToFloat(sArguments[1]);
CVar.SetBounds(ConVarBound_Lower, true, fValue);
CVar.SetBounds(ConVarBound_Upper, true, fValue);
CVar.SetFloat(fValue, true, false);
}
}
@@ -1,67 +0,0 @@
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#define MAXAMMO 10000
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public Plugin myinfo =
{
name = "IncreaseReserveAmmo",
author = "zaCade",
description = "Feex volvo bullshiet!",
version = "1.0.0"
};
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnPluginStart()
{
for(int client = 1; client <= MaxClients; client++)
{
if(IsClientInGame(client) && !IsFakeClient(client))
OnClientPutInServer(client);
}
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnClientPutInServer(int client)
{
if (!IsFakeClient(client))
{
SDKHook(client, SDKHook_WeaponEquipPost, OnWeaponAction);
SDKHook(client, SDKHook_WeaponDropPost, OnWeaponAction);
}
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnWeaponAction(int client, int weapon)
{
if (IsValidEntity(weapon))
{
if (!HasEntProp(client, Prop_Send, "m_iAmmo"))
return;
SetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount", MAXAMMO);
SetEntProp(weapon, Prop_Send, "m_iSecondaryReserveAmmoCount", MAXAMMO);
int AmmoTypePrimary = GetEntProp(weapon, Prop_Data, "m_iPrimaryAmmoType");
int AmmoTypeSecondary = GetEntProp(weapon, Prop_Data, "m_iSecondaryAmmoType");
// PrintToChatAll("Primary: %d | Secondary: %d", AmmoTypePrimary, AmmoTypeSecondary)
if (AmmoTypePrimary >= 0 && AmmoTypePrimary <= 13 || AmmoTypePrimary == 20)
if (GetEntProp(client, Prop_Send, "m_iAmmo", _, AmmoTypePrimary) >= 0)
SetEntProp(client, Prop_Send, "m_iAmmo", MAXAMMO, _, AmmoTypePrimary);
if (AmmoTypeSecondary >= 0 && AmmoTypeSecondary <= 13 || AmmoTypeSecondary == 20)
if (GetEntProp(client, Prop_Send, "m_iAmmo", _, AmmoTypeSecondary) >= 0)
SetEntProp(client, Prop_Send, "m_iAmmo", MAXAMMO, _, AmmoTypeSecondary);
}
}