From 3bafae404e5a7045816caec3a034c4ecb33a0617 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Fri, 20 Sep 2024 23:37:12 +0800 Subject: [PATCH] [server] Implement/match `n_SetPlayerColor(...)` --- server/scrcustom.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/scrcustom.cpp b/server/scrcustom.cpp index 047b0a6..6c88cbd 100644 --- a/server/scrcustom.cpp +++ b/server/scrcustom.cpp @@ -929,9 +929,15 @@ static cell AMX_NATIVE_CALL n_SetPlayerHealth(AMX *amx, cell *params) return 0; } +// native SetPlayerColor(playerid, color) static cell AMX_NATIVE_CALL n_SetPlayerColor(AMX *amx, cell *params) { - // TODO: SetPlayerColor + CPlayer* pPlayer = pNetGame->GetPlayerPool()->GetAt((PLAYERID)params[1]); + if(pPlayer) { + pPlayer->SetPlayerColor(params[2]); + return 1; + } + return 0; }