roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,210
- Solutions
- 35
- Reaction score
- 206
global_exhaust = {}
local cur_time = os.time()
if global_exhaust[cid] and global_exhaust[cid] > cur_time then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please wait a few seconds, then try command again.")
return true
end
global_exhaust[cid] = cur_time + 5
I do not want the exausted in specific scripts, I want it to have at all talkactions, so I need the modification by sourceits in the scripts for sure check local { exhaust = 30000 } setting lower than 1000 can cause heavy lags. if you cant find anything ad exhaust on your own then it will overwrite global settings you can check some lua 0.4 scripts to find exhaust i think !aol and backpack command has exhaust
global_exhaust = {}
local cur_time = os.time()
if global_exhaust[cid] and global_exhaust[cid] > cur_time then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please wait a few seconds, then try command again.")
return true
end
global_exhaust[cid] = cur_time + 5
but he wants the exhaust to be 0ms...To be clear, you don't need the modification by source you want the modification by source.
Opening up the 20 or so files in your talkactions and pasting in 6 lines of script to add the exhaust is really easy, and should take you less then 10 minutes total.
put in /lib/000-constant
paste underneath each "function onSay"LUA:global_exhaust = {}
LUA:local cur_time = os.time() if global_exhaust[cid] and global_exhaust[cid] > cur_time then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please wait a few seconds, then try command again.") return true end global_exhaust[cid] = cur_time + 5
" players are using some very quick talkactions by elfbot, which is causing lag"but he wants the exhaust to be 0ms...
No problem.my bad then i read it wrong Xikini has the best answer for this so case closed.