adrenyslopez
Member
- Joined
- Dec 22, 2015
- Messages
- 201
- Reaction score
- 15
Hello, help me with this scripts so that it can only be used 1 time per player or per IP
Me using: otbr tfs 1.3
Me using: otbr tfs 1.3
Lua:
local addcustom1 = Action()
function addcustom1.onUse(cid, item, fromPosition, itemEx, toPosition)
local mountid = math.random(1,32) -- you have to change 32 for your highest mount id
doPlayerAddMount(cid, mountid) --add the mount
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Has received a mount!") --message in console (red)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) --effect on player
doRemoveItem(item.uid, 1) -- remove the item
return TRUE
end
addcustom1:id(10141)
addcustom1:register()