• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua talkaction /say players

shakal1994

Member
Joined
Nov 20, 2020
Messages
77
Reaction score
15
Hello everybody

For starters, I'm using TFS 1.2, downgrade celohe to 8.0


I wanted a talkaction that players would send a global message, for x value of gold coins and a configured minute level


Would a kind soul have something like that?
 
Hello everybody

For starters, I'm using TFS 1.2, downgrade celohe to 8.0


I wanted a talkaction that players would send a global message, for x value of gold coins and a configured minute level


Would a kind soul have something like that?

Lua:
function onSay(player, words, param)
  if not player:removeMoney(100) then
    player:sendCancelMessage("You need 100gp.")
    return false
  end
  for _, targetPlayer in ipairs(Game.getPlayers()) do
    targetPlayer:sendPrivateMessage(player, param, TALKTYPE_BROADCAST)
  end
  return false
end
 
Lua:
function onSay(player, words, param)
  if not player:removeMoney(100) then
    player:sendCancelMessage("You need 100gp.")
    return false
  end
  for _, targetPlayer in ipairs(Game.getPlayers()) do
    targetPlayer:sendPrivateMessage(player, param, TALKTYPE_BROADCAST)
  end
  return false
end


I put it in talkaction but it won't :(


<talkaction words="/say" script="say.lua"/>


What would be the command to send the message?/say, hi
 
Back
Top