diff --git a/extensions/sdktools/vnatives.cpp b/extensions/sdktools/vnatives.cpp index ea66eb31..5e48d07c 100644 --- a/extensions/sdktools/vnatives.cpp +++ b/extensions/sdktools/vnatives.cpp @@ -516,19 +516,23 @@ static cell_t ForcePlayerSuicide(IPluginContext *pContext, const cell_t *params) return pContext->ThrowNativeError("\"CommitSuicide\" wrapper failed to initialize"); } } - bool bForce = false; - if (!strcmp(g_pSM->GetGameFolderName(), "zps")) - { - // ZPS requires force to be set as true otherwise the action itself is delayed. - // Which affects Slay and Timebomb. - bForce = true; - } START_CALL(); DECODE_VALVE_PARAM(1, thisinfo, 0); - *(bool *)(vptr + pCall->vparams[0].offset) = false; - *(bool *)(vptr + pCall->vparams[1].offset) = bForce; + + if (params[0] >= 2) + { + DECODE_VALVE_PARAM(2, vparams, 0); + } + else + { + *(bool *)(vptr + pCall->vparams[0].offset) = false; + } + + *(bool *)(vptr + pCall->vparams[1].offset) = true; + FINISH_CALL_SIMPLE(NULL); + return 1; } #else diff --git a/plugins/include/sdktools_functions.inc b/plugins/include/sdktools_functions.inc index 0cb25975..2f7ab129 100644 --- a/plugins/include/sdktools_functions.inc +++ b/plugins/include/sdktools_functions.inc @@ -102,9 +102,10 @@ native void TeleportEntity(int entity, const float origin[3] = NULL_VECTOR, cons * Forces a player to commit suicide. * * @param client Client index. + * @param explode If true, explode the player. * @error Invalid client or client not in game, or lack of mod support. */ -native void ForcePlayerSuicide(int client); +native void ForcePlayerSuicide(int client, bool explode = false); /** * Slaps a player in a random direction.