Code:
local exhaust = {
storage = 2152,
seconds = 5
}
function onDirection(cid, old, current)
if isPlayer(cid) then
if current ~= old and exhaustion.check(cid, exhaust.storage) then
doPlayerSendCancel(cid, 'Don\'t saturate the server making flood.')
return false
else
exhaustion.set(cid, exhaust.storage, exhaust.seconds)
end
end
return true
end
what should I put in .xml file to make it work? And where to put it (movements? globalevents?)