From 3b0ac5d1794ea9d9eb248918dcc60efcd00a3f53 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 10 Dec 2023 21:37:49 -0300 Subject: Fix bug with DelChrRegFromEveryPlayer --- npc/functions/util.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 3e5faae59..97a9c598b 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -71,6 +71,7 @@ function script DelChrRegFromEveryPlayer { query_sql("DELETE FROM `char_reg_str_db` WHERE `key`='"+getarg(0)+"'"); // Del variables which SQL can't reach + .@org = playerattached(); .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC); for (.@i = 0; .@i < .@c; .@i++) { attachrid(.@players[.@i]); @@ -80,6 +81,8 @@ function script DelChrRegFromEveryPlayer { setd(getarg(0), 0); detachrid(); } + if (.@org) + attachrid(.@org); return; } -- cgit v1.2.3-70-g09d2