Legal essa variável aqui,
local tempopravoltaraonormaldepoisdetercorridobastante = 10
Outra: pra quê usar isso
if isInArray(getPlayersOnline(), cid) then ... end
Se pode usar isso?
if not isCreature(cid) then return true end
Você economiza uma linha.
De qualquer maneira,
local exausted = 2
function onSay(cid, words, param)
if not isPremium(cid) then
return doPlayerSendCancel(cid, "You need P.A to use speed.")
elseif getPlayerStorageValue(cid, 91821) > os.time() then
return doPlayerSendCancel(cid, "Wait "..getPlayerStorageValue(cid, 91821).." seconds.")
end
local tempopravoltaraonormaldepoisdetercorridobastante = 10
function tira()
if isInArray(getPlayersOnline(), cid) then
doChangeSpeed(cid,-1200)
end
end
doChangeSpeed(cid, 600)
addEvent(tira, tempopravoltaraonormaldepoisdetercorridobastante*1000)
doCreatureSay(cid, "Strong Haste", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 91821, os.time() + exausted)
return true
end