vingo
Active Member
- Joined
- Oct 27, 2012
- Messages
- 464
- Reaction score
- 43
Is there any possibility to make a talkaction that when you have a specific item(doll) you can say "!mount slug" and you will get tigerslug doll for TFS 1.0?
I currently have this
I currently have this
PHP:
function isIn(list)
local status
for key, value in pairs(list) do
if key == param then
return key, value
end
end
end
--you need to add the mounts and id's
--separate each entry with comma
local mounts = {
slug = 1
}
local item_id = 5785 --w/e item you are using
function onSay(cid, words, param)
if isIn(mounts) and doPlayerRemoveItem(cid,item_id,1) then
doPlayerAddMount(cid, value)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "That mount doesn't exist or you do not have the required item.")
end
return
end