Forkz
Well-Known Member
- Joined
- Jun 29, 2020
- Messages
- 380
- Solutions
- 1
- Reaction score
- 89
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