Itutorial
Legendary OT User
- Joined
- Dec 23, 2014
- Messages
- 2,334
- Solutions
- 68
- Reaction score
- 1,012
Talkactions with params do not execute.
This isn't the actual code but just an example. If I type
It will say "Usage: /addvip name, amount" but if I type
/addvip name
or anything else other than /addvip it wont even start the code. Using prints there is nothing at all.
Lua:
local vipTalk = TalkAction("/addvip","/vip","!vip")
function vipTalk.onSay(player, words, param, type)
if (words == "/addvip") then
local t = param.split(",")
local name = t[1]
local amount = t[2]
if not name or amount then
player:sendCancelMessage("Usage: /addvip name, amount")
return false
end
local target = Player(name)
addVipDays(target)
end
return false
end
vipTalk:separator(" ")
vipTalk:register()
This isn't the actual code but just an example. If I type
Code:
/addvip
It will say "Usage: /addvip name, amount" but if I type
/addvip name
or anything else other than /addvip it wont even start the code. Using prints there is nothing at all.