Added shop categories, mounts and outfits.

Display outfits currently only work in shop.
This commit is contained in:
Znote
2017-01-30 06:48:46 +01:00
parent be49eb98e2
commit 695cb58b04
7 changed files with 440 additions and 61 deletions

View File

@@ -32,11 +32,30 @@ function onSay(cid, words, param)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Need more CAP!")
end
end
-- ORDER TYPE 5 (Outfit and addon)
if q_type == 5 then
-- Make sure player don't already have this outfit and addon
if not canPlayerWearOutfit(cid, q_itemid, q_count) then
db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";")
doPlayerAddOutfit(cid,q_itemid,q_count)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already have this outfit and addon!")
end
end
-- ORDER TYPE 6 (Mounts)
-- Not supported on TFS 0.2
-- Add custom order types here
-- Type 2 is reserved for premium days and is handled on website, not needed here.
-- Type 3 is reserved for character gender(sex) change and is handled on website as well.
-- So use type 4+ for custom stuff, like etc packages.
-- if q_type == 4 then
-- Type 1 is for itemids (Already coded here)
-- Type 2 is for premium (Coded on web)
-- Type 3 is for gender change (Coded on web)
-- Type 4 is for character name change (Coded on web)
-- Type 5 is for character outfit and addon (Already coded here)
-- Type 6 is for mounts (Not for TFS 0.2)
-- So use type 7+ for custom stuff, like etc packages.
-- if q_type == 7 then
-- end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have no orders.")