misc lib updates

This commit is contained in:
Jackzie 2022-01-07 07:52:52 -06:00
parent 509c6a1b21
commit fa583fdee9
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
6 changed files with 4161 additions and 7 deletions

View file

@ -212,6 +212,15 @@ bool IsAnyPlayerNear(int source, float range) {
return false;
}
void ThrowItemToPlayer(int victim, int target, int slot) {
int wpn = GetPlayerWeaponSlot(victim, slot);
if(wpn > 0 && (slot != 1 || DoesClientHaveMelee(victim))) {
static float pos[3];
GetClientAbsOrigin(target, pos);
SDKHooks_DropWeapon(victim, wpn, pos);
}
}
void ThrowItemToClosestPlayer(int victim, int slot) {
int wpn = GetPlayerWeaponSlot(victim, slot);
if(wpn > 0 && (slot != 1 || DoesClientHaveMelee(victim))) {