Skip to content

feat: IRecipientFilter & DispatchParticleEffect #112

@2oaJ

Description

@2oaJ

I tried to use "Memory. LoadFromSignature" to call DispatcheParticleEffect, I found that it needed "IRecipitantFilter", but I couldn't find a way to get the “RecipitantFilter” of a certain player.
It would be even better if it could support CRecipientFilter, CSingleRecipientFilter, and CBroadcastRecipientFilter.
my code:

[Commands.Register("test")]
public void OnTestCommand(int playerid, string[] arguments, int count, bool silent, string prefix)
{
    var player = Generic.GetPlayer(playerid);

    Memory memory = new ();
    memory.LoadFromSignature("server", "\x48\x89\x5C\x24\x08\x48\x89\x74\x24\x10\x48\x89\x7C\x24\x18\x4C\x89\x74\x24\x20\x55\x48\x8D\x6C\x24\xD1"); // windows
    var hook = Hooks.AddHook(memory, "sipssbipp", "i");

    Hooks.CallHook(hook,
                   "particles/1.vpcf",
                   (int)ParticleAttachment_t.PATTACH_POINT_FOLLOW,
                   player!.CBaseEntity().GetClassDataPtr(),// 
                   "0",
                   "",
                   false,
                   0,
                   IntPtr.Zero,//  I don't know how to get IRcipientFilter, this is a placeholder
                   0);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions