How to use?
And this script adding items to your SMS SHOP.
/shop_add itemname, count, points, description
example:
/shop_add Iron Ore, 25, 50, You see iron ore bla bla.
And this script adding items to your SMS SHOP.
/shop_add itemname, count, points, description
example:
/shop_add Iron Ore, 25, 50, You see iron ore bla bla.
Code:
function onSay(cid, words, param)
--> By Seminari <--
--[[ Wiec tak komenda /shop_add item_nazwa, count, points, opis
offer_name = item_nazwa
itemid1 = item_nazwa ale id
count1 = count
offertype = item (zawsze!)
offerdescription = opis
]]--
local t = string.explode(param, ",")
local offer_name = "" .. t[1] .. ""
local count1 = t[2]
local points = t[3]
local itemid1 = getItemIdByName("" .. t[1] .. "")
local offer_type = "item"
local offer_description = "" .. t[4] .. ""
db.executeQuery("INSERT INTO `" .. getConfigValue('sqlDatabase') .."`.`z_shop_offer`(`points` ,`itemid1` ,`count1`, `offer_type` , `offer_description`, `offer_name` ) VALUES ('" .. points .. "', '" .. itemid1 .. "', '" .. count1 .. "', '" .. offer_type .. "', '" .. offer_description .. "', '" .. offer_name .. "');")
return true
end
Last edited: