Forkz
Intermediate OT User
- Joined
- Jun 29, 2020
- Messages
- 528
- Solutions
- 16
- Reaction score
- 129
Hi otlanders,
data/talkactions/lib/talkactions.lua
Below the onSay function
data/talkactions/lib/talkactions.lua
LUA:
-- Prevent spamm commands --
function checkExhausted(cid, storage, seconds)
local v = exhaustion.get(cid, storage)
if(not v) then
exhaustion.set(cid, storage, seconds)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Please wait " .. v .. " seconds before trying this command again.")
return false
end
return true
end
Below the onSay function
LUA:
if(not checkExhausted(cid, 666, 10)) then
return false
end