vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
Hi, i try make shop in command, but i dont know how to check player have items or no, and if have remove it and add item. I have it:
Code:
local mindcontrol = TalkAction("!shop")
function mindcontrol.onSay(player, words, param)
if param == '' then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'None')
return true
elseif param == 'test1' then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'test')
player:addItem(12661,1)
player:removeItem(2173,1)
return true
elseif param == 'test2' then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'test')
player:addItem(12662,1)
player:removeItem(2173,1)
return true
end
end
mindcontrol:separator(" ")
mindcontrol:register()