From eb40d14ee85773dfba144877c413d67656a87077 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:18:55 +0800 Subject: [PATCH] [server] Implement/match `n_SetPlayerCheckpoint(...)` --- server/scrcustom.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/scrcustom.cpp b/server/scrcustom.cpp index 2941626..d7df1e8 100644 --- a/server/scrcustom.cpp +++ b/server/scrcustom.cpp @@ -997,7 +997,14 @@ static cell AMX_NATIVE_CALL n_GetPlayerName(AMX *amx, cell *params) static cell AMX_NATIVE_CALL n_SetPlayerCheckpoint(AMX *amx, cell *params) { - // TODO: SetPlayerCheckpoint + CPlayer *pPlayer = pNetGame->GetPlayerPool()->GetAt((PLAYERID)params[1]); + if (pPlayer) + { + pPlayer->SetCheckpoint(amx_ctof(params[2]), amx_ctof(params[3]), + amx_ctof(params[4]), amx_ctof(params[5])); + + return 1; + } return 0; }