From 3ceaacfb9342a6724174efccf2f7cf53d4267c0e Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 22 Sep 2024 20:49:17 +0800 Subject: [PATCH] [server] Implement/match `n_GangZoneHideForPlayer(...)` --- server/scrcustom.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/scrcustom.cpp b/server/scrcustom.cpp index 8e3e381..82f9536 100644 --- a/server/scrcustom.cpp +++ b/server/scrcustom.cpp @@ -624,10 +624,14 @@ static cell AMX_NATIVE_CALL n_GangZoneShowForAll(AMX *amx, cell *params) return 1; } +// native GangZoneHideForPlayer(playerid, zone) static cell AMX_NATIVE_CALL n_GangZoneHideForPlayer(AMX *amx, cell *params) { - // TODO: GangZoneHideForPlayer - return 0; + if (!pNetGame->GetPlayerPool()->GetSlotState(params[1])) return 0; + CGangZonePool *pGangZonePool = pNetGame->GetGangZonePool(); + if (!pGangZonePool || !pGangZonePool->GetSlotState(params[2])) return 0; + pGangZonePool->HideForPlayer(params[1], params[2]); + return 1; } static cell AMX_NATIVE_CALL n_GangZoneHideForAll(AMX *amx, cell *params)