summaryrefslogtreecommitdiff
path: root/npc/001-8
diff options
context:
space:
mode:
Diffstat (limited to 'npc/001-8')
-rw-r--r--npc/001-8/hub.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt
index 414ba25ad..9ba3cf5e8 100644
--- a/npc/001-8/hub.txt
+++ b/npc/001-8/hub.txt
@@ -354,7 +354,12 @@ OnPCLogoutEvent:
if (@cartinventorylist_count>=1) {
// Obviously a cheater, you should not be using the cart on the event. I HATE CHEATERS!
// Destroy everything you had on the cart
- query_sql("DELETE FROM `cart_inventory` WHERE `char_id`="+getcharid(0));
+ if ($@HAS_API) {
+ query_sql("DELETE FROM `cart_inventory` WHERE `char_id`="+getcharid(0));
+ } else {
+ apiasync("SQL", sprintf("DELETE FROM `cart_inventory` WHERE `char_id`='%d'", getcharid(0)));
+ apiasync("SQLRUN", "");
+ }
// Destroy the cart. Cheaters doesn't deserve it!!
setcart(0);
// Delete the storage register. You now need to pay it again, to don't cheat anymore!