Untitled

 avatar
unknown
plain_text
9 months ago
1.3 kB
3
Indexable
local limite = 100 -- límite de dodge
local storagedodge = 98798644 -- storage de dodge
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local playerPosition = getPlayerPosition(cid) -- obtén la posición del jugador
    
    if getPlayerStorageValue(cid, storagedodge) == -1 then
        doPlayerSetStorageValue(cid, storagedodge, (getPlayerStorageValue(cid, storagedodge)) + 2)
        doSendAnimatedText(playerPosition, "DodgeSKILL: ["..getPlayerStorageValue(cid, storagedodge).."/"..limite.."].", TEXTCOLOR_ORANGE) -- muestra el mensaje encima del jugador con un efecto
    elseif getPlayerStorageValue(cid, storagedodge) >= -1 and getPlayerStorageValue(cid, storagedodge) <= limite then
        doPlayerSetStorageValue(cid, storagedodge, (getPlayerStorageValue(cid, storagedodge)) + 1)
        doSendAnimatedText(playerPosition, "DodgeSKILL: ["..getPlayerStorageValue(cid, storagedodge).."/"..limite.."].", TEXTCOLOR_ORANGE) -- muestra el mensaje encima del jugador con un efecto
        doRemoveItem(item.uid, 1)
    else
        doSendAnimatedText(playerPosition, "Você já chegou no máximo. DodgeSKILL: ["..getPlayerStorageValue(cid, storagedodge).."/"..limite.."]", TEXTCOLOR_ORANGE) -- muestra el mensaje encima del jugador con un efecto
    end
    
    return true
end
Editor is loading...
Leave a Comment