12 : _hook(
"WeaponDrop", [
this] {
return Install(); }),
13 Before(_hook.ForEvent()),
28 CEntityInstance*
pawn = Schema::CPlayer_WeaponServices{&
services}.OwnerEntity();
41 if (!_bindings.DropWeapon)
43 return std::unexpected(Error::Unsupported(
"the CCSPlayer_WeaponServices::DropWeapon signature did not bind"));
runtime.Entities: finds and creates entities. Everything it returns is valid for this frame only; see...
static HookResult Block(Ret value)
WeaponDrop(EntitySystem &entities, const Bindings &bindings)
Event< WeaponDropRequest & > Before
Result< Subscription > HookFunction(std::string_view name, const Fn< Ret(Object *, Args...)> &function, Before &&before, After &&after=nullptr)
Hook a signature-bound function at its entry.
static std::string ReadFile(const std::filesystem::path &path)
constexpr bool IsValidSlot(int slot)
std::expected< void, Error > Status
Fn< bool(EngineWeaponServices *, CEntityInstance *, bool)> DropWeapon