diff --git a/src/zr/zspawn.inc b/src/zr/zspawn.inc index 05fd24d..c6e9fa0 100644 --- a/src/zr/zspawn.inc +++ b/src/zr/zspawn.inc @@ -285,6 +285,15 @@ public ZSpawnForceHandle(Handle:menu_zspawn_force, MenuAction:action, client, sl // Get the client index of the selected client. new target = MenuGetClientIndex(menu_zspawn_force, slot); + // If the target is 0, then the client left before being selected from the menu. + if (target == 0) + { + // Re-send the menu. + MenuClientList(client, ZSpawnForceHandle, true, true, false, "ZSpawn clients title"); + + return; + } + // Get the target's name for future use. decl String:targetname[MAX_NAME_LENGTH]; GetClientName(target, targetname, sizeof(targetname)); diff --git a/src/zr/ztele.inc b/src/zr/ztele.inc index 0cbca67..60ad87f 100644 --- a/src/zr/ztele.inc +++ b/src/zr/ztele.inc @@ -253,6 +253,15 @@ public ZTeleForceHandle(Handle:menu_ztele_force, MenuAction:action, client, slot // Get the client index of the selected client. new target = MenuGetClientIndex(menu_ztele_force, slot); + // If the target is 0, then the client left before being selected from the menu. + if (target == 0) + { + // Re-send the menu. + MenuClientList(client, ZTeleForceHandle, true, true, false, "ZTele clients title"); + + return; + } + // Get the target's name for future use. decl String:targetname[MAX_NAME_LENGTH]; GetClientName(target, targetname, sizeof(targetname));