FabianoBN
l|¬¬"|l
Please someone help me?
I'm making a command addon doll.
But when I use the command addon, storage is not adding value.
Could anyone help me?
Script:
I'm making a command addon doll.
But when I use the command addon, storage is not adding value.
Could anyone help me?
Script:
PHP:
function onSay(cid, words, param)
local female = {
["citizen"]={136, 10001},
["hunter"]={137, 10003},
["mage"]={138, 10007},
["knight"]={139, 10005},
["nobleman"]={140, 10015},
["summoner"]={141, 10009},
["warrior"]={142, 10019},
["barbarian"]={147, 10011},
["druid"]={148, 10013},
["wizard"]={149, 10021},
["oriental"]={150, 10017},
["pirate"]={155, 10027},
["assassin"]={156, 10023},
["beggar"]={157, 10025},
["shaman"]={158, 10029},
["norsewoman"]={252, 10031},
["nightmare"]={269, 10037},
["jester"]={270, 10033},
["brotherhood"]={279, 10039},
["demonhunter"]={288, 10035},
["yalaharian"]={324, 10041}
}
local male = {
["citizen"]={128, 10001},
["hunter"]={129, 10003},
["mage"]={130, 10007},
["knight"]={131, 10005},
["nobleman"]={132, 10015},
["summoner"]={133, 10009},
["warrior"]={134, 10019},
["barbarian"]={143, 10011},
["druid"]={144, 10013},
["wizard"]={145, 10021},
["oriental"]={146, 10017},
["pirate"]={151, 10027},
["assassin"]={152, 10023},
["beggar"]={153, 10025},
["shaman"]={154, 10029},
["norsewoman"]={251, 10031},
["nightmare"]={268, 10037},
["jester"]={273, 10033},
["brotherhood"]={278, 10039},
["demonhunter"]={289, 10035},
["yalaharian"]={325, 10041}
}
local msgs = {
"Incorrect param!",
"You need Addon Doll!",
"Incorrect param!",
"Addon sucesfully added!",
"You already have this addon!"
}
local param = string.lower(param)
if(getPlayerItemCount(cid, 8982) > 0) then
if(param ~= "" and male[param] and female[param]) then
doPlayerRemoveItem(cid, 8982, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msgs[4])
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
if(getPlayerSex(cid) == 0) then
getPlayerStorageValue(cid, female[param][2])
doPlayerAddOutfit(cid, female[param][1], 1)
else
getPlayerStorageValue(cid, male[param][2])
doPlayerAddOutfit(cid, male[param][1], 1)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msgs[1])
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msgs[2])
end
end