From a479a6d9ac03197d6cb7fe17697be64674c3fa6d Mon Sep 17 00:00:00 2001 From: jenz Date: Mon, 13 Nov 2023 20:07:02 +0100 Subject: [PATCH] updated the previous client to exclude the correct indexes of previous clients --- _Hide/scripting/Hide.sp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/_Hide/scripting/Hide.sp b/_Hide/scripting/Hide.sp index b47f58a..75fad78 100644 --- a/_Hide/scripting/Hide.sp +++ b/_Hide/scripting/Hide.sp @@ -218,11 +218,11 @@ public Action Hook_SetTransmit(int target, int client) } -//October 2023 edit: using OnGameFrame to just hide 1 player per frame. supposedly (a rumor) that is good enough to actually work. +//October 2023 edit: using OnGameFrame to just hide 5 player per frame. supposedly (a rumor) that is good enough to actually work. public void OnGameFrame() { static int client = 0; - int iterate_amount = 1; + int iterate_amount = 5; for (int i = 0; i < iterate_amount; i++) { //restart from the beginning @@ -239,10 +239,10 @@ public void OnGameFrame() continue; } - int previous_client = client - 1; + int previous_client = client - (i + 1); if (previous_client < 1) { - previous_client = MAXPLAYERS - 1; + previous_client = MAXPLAYERS - (i + 1); } for (int target = 1; target <= MaxClients; target++) { @@ -361,4 +361,3 @@ public void MenuHandler_CookieMenu(int client, CookieMenuAction action, any info } } -