From 83f18765452ba46161796be8fffb894853485859 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 22 Sep 2024 20:48:28 +0800 Subject: [PATCH] [server] Implement/match `n_GangZoneShowForPlayer(...)` --- server/scrcustom.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/scrcustom.cpp b/server/scrcustom.cpp index 6cd82d2..d0d6990 100644 --- a/server/scrcustom.cpp +++ b/server/scrcustom.cpp @@ -605,10 +605,14 @@ static cell AMX_NATIVE_CALL n_GangZoneDestroy(AMX *amx, cell *params) return 1; } +// native GangZoneShowForPlayer(playerid, zone, color) static cell AMX_NATIVE_CALL n_GangZoneShowForPlayer(AMX *amx, cell *params) { - // TODO: GangZoneShowForPlayer - return 0; + if (!pNetGame->GetPlayerPool()->GetSlotState(params[1])) return 0; + CGangZonePool *pGangZonePool = pNetGame->GetGangZonePool(); + if (!pGangZonePool || !pGangZonePool->GetSlotState(params[2])) return 0; + pGangZonePool->ShowForPlayer(params[1], params[2], params[3]); + return 1; } static cell AMX_NATIVE_CALL n_GangZoneShowForAll(AMX *amx, cell *params)