1
Agregar funcion a script el Mar Ago 08, 2017 5:06 am
treeckoo

Nuevo Miembro

Tengo la parte donde te pide el storage y te da el % de experiencia doble, pero como pudiera agregar que al momento de utilizar tambien te cobre algo de dinero.
- Código:
function onSay(player, words, param)
if player:getStorageValue(15001) <= 1 then
return true
end
if player:getStorageValue(BONUS_EXP_STORAGE) >= os.time() then
player:say('double exp is already active!', TALKTYPE_MONSTER_SAY)
return true
end
local players = Game.getPlayers()
for k, targetPlayer in ipairs(players) do
targetPlayer:setStorageValue(BONUS_EXP_STORAGE, os.time() + time)
targetPlayer:sendTextMessage(MESSAGE_INFO_DESCR, string.format("You have activated %d hour%s of double experience.", config.time, config.time ~= 1 and "s" or ""))
end
return false
end
