local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid, 37327) == 1 then
return doPlayerSendCancel(cid, "You can not squat on you runs.")
end
if getCreatureCondition(cid, CONDITION_INVISIBLE) or getPlayerStorageValue(cid, 37328) == 1 then
doRemoveCondition(cid, CONDITION_INVISIBLE)
doChangeSpeed(cid, (30/100*getCreatureBaseSpeed(cid)))
setPlayerStorageValue(cid, 37328, 0)
setPlayerStorageValue(cid, 66875, os.time())
doSendAnimatedText(getCreaturePosition(cid), "raising!!!", 180)
else
local time = 10
if (os.time()-getPlayerStorageValue(cid, 66875)+1) <= time then
local minutes, seconds = getTime(time-(os.time()-getPlayerStorageValue(cid, 66875)))
return doPlayerSendCancel(cid, "Wait ".. seconds .." secs to squat again.")
end
doAddCondition(cid, condition)
doChangeSpeed(cid, -(30/100*getCreatureBaseSpeed(cid)))
doSendAnimatedText(getCreaturePosition(cid), "crouch!!!", 180)
setPlayerStorageValue(cid, 37328, 1)
end
return true
end