diff --git a/src/karyuu/client.inc b/src/karyuu/client.inc index 7e7b0a9..f60905b 100644 --- a/src/karyuu/client.inc +++ b/src/karyuu/client.inc @@ -6,8 +6,8 @@ #define MAX_AUTH_LENGTH 21 #define MAX_IP_LENGTH 23 -#define KARYUU_LOOP_CLIENTS(%1) for (int %1 = 1; %1 <= MAXPLAYERS + 1; %1++) if (IsClientInGame(%1)) -#define KARYUU_LOOP_PLAYERS(%1) for (int %1 = 1; %1 <= MAXPLAYERS + 1; %1++) if (IsClientInGame(%1) && !IsFakeClient(%1)) +#define KARYUU_LOOP_CLIENTS(%1) for (int %1 = 1; %1 <= MAXPLAYERS; %1++) if (IsClientInGame(%1)) +#define KARYUU_LOOP_PLAYERS(%1) for (int %1 = 1; %1 <= MAXPLAYERS; %1++) if (IsClientInGame(%1) && !IsFakeClient(%1)) enum WaterLevel { @@ -244,6 +244,11 @@ stock int Karyuu_GetClientDeaths(int iClient) return GetEntProp(iClient, Prop_Data, "m_iDeaths"); } +stock int Karyuu_GetClientMoney(int iClient) +{ + return GetEntProp(iClient, Prop_Send, "m_iAccount"); +} + stock void Karyuu_SetClientMoney(int iClient, int iValue) { SetEntProp(iClient, Prop_Send, "m_iAccount", iValue); diff --git a/src/karyuu/variable/strings.inc b/src/karyuu/variable/strings.inc index d441810..c856846 100644 --- a/src/karyuu/variable/strings.inc +++ b/src/karyuu/variable/strings.inc @@ -206,4 +206,26 @@ stock int Karyuu_CountChar(int character, const char[] string) count++; } return count; +} + +stock void Karyuu_ShuffleString(char[] sBuffer, int iSize) +{ + ArrayList arTemp = new ArrayList(); + + for (int iCount = 0; iCount < iSize; iCount++) + { + if (sBuffer[iCount] == EOS) + break; + + arTemp.Push(sBuffer[iCount]); + } + + arTemp.Sort(Sort_Random, Sort_String); + + int iarSize = arTemp.Length; + for (int iCount = 0; iCount < iarSize; iCount++) + { + sBuffer[iCount] = view_as(arTemp.Get(iCount)); + } + delete arTemp; } \ No newline at end of file diff --git a/src/karyuu/weapon.inc b/src/karyuu/weapon.inc index 9f9cae5..537450e 100644 --- a/src/karyuu/weapon.inc +++ b/src/karyuu/weapon.inc @@ -5,8 +5,24 @@ #define MAX_WEAPON_CLASSNAME_LENGTH 24 #define MAX_WEAPON_NAME_LENGTH 48 -#define MAX_WEAPON_PREFIX_LENGTH 6 -#define MAX_WEAPONS 48 +#define MAX_WEAPON_PREFIX_LENGTH 6 +#define MAX_WEAPONS 48 + +#define Karyuu_HITGROUP_GENERIC 0 +#define Karyuu_HITGROUP_HEAD 1 +#define Karyuu_HITGROUP_CHEST 2 +#define Karyuu_HITGROUP_STOMACH 3 +#define Karyuu_HITGROUP_LEFTARM 4 +#define Karyuu_HITGROUP_RIGHTARM 5 +#define Karyuu_HITGROUP_LEFTLEG 6 +#define Karyuu_HITGROUP_RIGHTLEG 7 +#define Karyuu_HITGROUP_GEAR 10 + +#define Karyuu_HEGrenadeOffset 14 +#define Karyuu_FlashbangOffset 15 +#define Karyuu_SmokegrenadeOffset 16 +#define Karyuu_IncGrenadesOffset 17 +#define Karyuu_DecoyGrenadeOffset 18 char gKaryuu_WeaponClasses[][] = { /* 0*/ "weapon_awp", /* 1*/ "weapon_ak47", /* 2*/ "weapon_m4a1", /* 3*/ "weapon_m4a1_silencer", /* 4*/ "weapon_deagle", /* 5*/ "weapon_usp_silencer", /* 6*/ "weapon_hkp2000", /* 7*/ "weapon_glock", /* 8*/ "weapon_elite",