mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-09 00:13:20 +00:00
misc lib updates
This commit is contained in:
parent
509c6a1b21
commit
fa583fdee9
6 changed files with 4161 additions and 7 deletions
|
@ -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))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue