• 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 [TFS 1.2][8.6] exhaustion on talkactions

PRLOts

Member
Joined
Jun 24, 2017
Messages
116
Solutions
4
Reaction score
15
Dear Otland!

I was trying to make exhaustion on talkactions for players, I've tried with script to save character and add function but it seems that it doesn't exist on tfs 1.2 :(


Lua:
  function onSay(player, words, param, cid)
  if exhaustion.get(cid, 501) then
        doPlayerSendCancel(cid, 'You can use this command only once per 10 seconds.')
        return true
    end
     exhaustion.set(cid, 501, 10)
if (param == '') then
     player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
        player:say('SAVE!', TALKTYPE_MONSTER_SAY)
player:save()
  return false
end
end

And after I use this talkaction in game I see error

global.png

Anyone know how to correctly add function exhaustion to global index? Thanks for reply and best regards!
 
Back
Top