• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

help me to improve this SCRIPT. Rep+

Piltrafa

Active Member
Joined
Nov 10, 2010
Messages
654
Reaction score
29
Hello, I want to change this Scripts to vips get 50% extra rate.
PHP:
local config = {
rate = 1.5, -- 4x More Experience
storage = 20012
}
local function endExpRate(cid)
if isPlayer(cid) == TRUE then
doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate
setPlayerStorageValue(cid, config.storage, -1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.")
end
end
function onLogin(cid)
local str = getPlayerStorageValue(cid, config.storage)
if(str >= 0 and (str - os.time()) > 0) then
doPlayerSetRate(cid, SKILL__LEVEL, config.rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your extra exp rate will expire at: " .. os.date("%X", str))
addEvent(endExpRate, (str - os.time()) * 1000, cid)
else
doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You do not have any extra experience time.")
setPlayerStorageValue(cid, config.storage, -1)
end
return TRUE
end
It use base on storage value, but I want to chage if getPlayerVipDays(cid) >= 1 then and end when Vipdays its 0

Anyone knows?
Thanks, and repped if work fine.
 
Back
Top