Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect offset for CommitSuicide #2224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

The-Doggy
Copy link

Tested working on latest HL2:DM Linux DS using SM 1.12.0.7169 via the following test code:

#include <sdktools>

Handle Call_CommitSuicide;

public void OnPluginStart()
{
    RegConsoleCmd("sm_suicide", Command_Suicide);
    StartPrepSDKCall(SDKCall_Player);
    PrepSDKCall_SetVirtual(446);
    PrepSDKCall_AddParameter(SDKType_Bool, SDKPass_Plain);
    PrepSDKCall_AddParameter(SDKType_Bool, SDKPass_Plain);
    Call_CommitSuicide = EndPrepSDKCall();

    if(Call_CommitSuicide == INVALID_HANDLE)
    {
        SetFailState("Failed to setup CommitSuicide call");
    }
}

public Action Command_Suicide(int client, int args)
{
    if(IsClientInGame(client))
    {
        SDKCall(Call_CommitSuicide, client, false, false);
    }
    return Plugin_Handled;
}

Copy link
Member

@psychonic psychonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants