- Gloves?

Currently only in plugin, website update soon
This commit is contained in:
Dawid Bepierszcz
2024-02-19 13:56:55 +01:00
parent bbbf27a751
commit a37f4e9e58
92 changed files with 370 additions and 153 deletions

View File

@@ -268,8 +268,10 @@ namespace WeaponPaints
}
player.RemoveWeapons();
AddTimer(0.2f, () =>
AddTimer(0.35f, () =>
{
GiveKnifeToPlayer(player);
if (bomb)
player.GiveNamedItem("weapon_c4");
@@ -286,8 +288,6 @@ namespace WeaponPaints
if (healthshot)
player.GiveNamedItem("weapon_healtshot");
GiveKnifeToPlayer(player);
foreach (var entry in weaponsWithAmmo)
{
foreach (var ammo in entry.Value)
@@ -310,7 +310,7 @@ namespace WeaponPaints
});
}
}
});
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
}
}
@@ -375,6 +375,18 @@ namespace WeaponPaints
return new CSkeletonInstance(GetSkeletonInstance(node.Handle));
}
public void SetOrAddAttributeValueByName(CAttributeList attr, string name, float f)
{
var SetAttr = VirtualFunction.Create<IntPtr, string, float, int>("\\x55\\x48\\x89\\xE5\\x41\\x57\\x41\\x56\\x49\\x89\\xFE\\x41\\x55\\x41\\x54\\x49\\x89\\xF4\\x53\\x48\\x83\\xEC\\x78");
SetAttr(attr.Handle, name, f);
}
public void SetPlayerBody(CCSPlayerController player, string model, int i)
{
var SetBody = VirtualFunction.Create<IntPtr, string, int, int>("\\x55\\x48\\x89\\xE5\\x41\\x56\\x49\\x89\\xF6\\x41\\x55\\x41\\x89\\xD5\\x41\\x54\\x49\\x89\\xFC\\x48\\x83\\xEC\\x08");
SetBody(player.PlayerPawn.Value!.Handle, model, i);
}
private static unsafe CHandle<CBaseViewModel>[]? GetPlayerViewModels(CCSPlayerController player)
{
if (player.PlayerPawn.Value == null || player.PlayerPawn.Value.ViewModelServices == null) return null;