• 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!

Lua -=[TFS]=- 0.4 8.60 Error on Script endvip.ua

samuel157

/root
Joined
Mar 19, 2010
Messages
447
Solutions
3
Reaction score
49
Location
São Paulo, Brazil
GitHub
Samuel10M
*Fixed bug [VIP]. Search bug this script: endvip.lua

Lua:
--[[ By Samuel [email protected] ]]--
function onLogin(cid)

if getPlayerStorageValue(cid, 13545) - os.time() > 0 then
setPlayerStorageValue(cid, 13545, 1)
end

local pos = {x = 154, y = 51, z = 7} -- posiçao do templo.

function EddyHavoc(cid)
if isPlayer(cid) then
db.executeQuery("UPDATE `players` SET `name` = '"..string.sub(getCreatureName(cid), 7).."' WHERE `id` = "..getPlayerGUID(cid)..";")
doRemoveCreature(cid)
end
end

if getPlayerStorageValue(cid, 13545) == 1 and getPlayerStorageValue(cid, 13545) - os.time() < 1 or getPlayerStorageValue(cid, 13545) - os.time() == 0 then
doTeleportThing(cid, pos)
doPlayerPopupFYI(cid, "Sua vip Account acabou.")
setPlayerStorageValue(cid, 13545, -1)
if string.find(tostring(getCreatureName(cid)),"[[VIP]]") then
addEvent(EddyHavoc, 3*1000, cid)
end
end
return TRUE
end
 
Last edited:
Solution
Lua:
function onLogin(cid)
    local vipStorage = getPlayerStorageValue(cid, 13545)
    
    if vipStorage > 0 then
        if vipStorage - os.time() <= 0 then
            setPlayerStorageValue(cid, 13545, -1)
            doPlayerPopupFYI(cid, "Sua VIP Account acabou.")
            if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then
                addEvent(EddyHavoc, 3 * 1000, cid)
            end
        else
            local pos = {x = 154, y = 51, z = 7}
            doTeleportThing(cid, pos)
            doPlayerPopupFYI(cid, "Sua VIP Account acabou.")
            setPlayerStorageValue(cid, 13545, -1)
            if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then
                addEvent(EddyHavoc, 3 * 1000...
Lua:
function onLogin(cid)
    local vipStorage = getPlayerStorageValue(cid, 13545)
    
    if vipStorage > 0 then
        if vipStorage - os.time() <= 0 then
            setPlayerStorageValue(cid, 13545, -1)
            doPlayerPopupFYI(cid, "Sua VIP Account acabou.")
            if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then
                addEvent(EddyHavoc, 3 * 1000, cid)
            end
        else
            local pos = {x = 154, y = 51, z = 7}
            doTeleportThing(cid, pos)
            doPlayerPopupFYI(cid, "Sua VIP Account acabou.")
            setPlayerStorageValue(cid, 13545, -1)
            if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then
                addEvent(EddyHavoc, 3 * 1000, cid)
            end
        end
    end
    return true
end
 
Solution

Similar threads

Back
Top