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

[SQLite] -=[TFS]=- 0.4 8.60 [Creaturescripts] endvip.lua

samuel157

/root
Joined
Mar 19, 2010
Messages
447
Solutions
3
Reaction score
49
Location
São Paulo, Brazil
GitHub
Samuel10M
When I buy the VIP it says I'm done with the VIP

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, "You VIP end.")
            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, "You Vip end.")
            setPlayerStorageValue(cid, 13545, -1)
            if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then
                addEvent(EddyHavoc, 3 * 1000, cid)
            end
        end
    end
    return true
end
 
When I buy the VIP it says I'm done with the VIP

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, "You VIP end.")
            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, "You Vip end.")
            setPlayerStorageValue(cid, 13545, -1)
            if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then
                addEvent(EddyHavoc, 3 * 1000, cid)
            end
        end
    end
    return true
end
Check this script

Lua:
function onLogin(cid)
    local vipStorage = getPlayerStorageValue(cid, 13545)
  
        if vipStorage >= os.time() then
            doPlayerPopupFYI(cid, "You are VIP.")
        else
            local pos = {x = 154, y = 51, z = 7}
            doTeleportThing(cid, pos)
            doPlayerPopupFYI(cid, "You Vip end.")
            setPlayerStorageValue(cid, 13545, -1)
            if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then
                addEvent(EddyHavoc, 3 * 1000, cid)
            end
        end
    return true
end
 
use this script when vip finishes it will be kicked automatically



Lua:
function onLogin(cid)

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

local pos = {x = 154, y = 51, z = 7} -- Temple Position.

function Vodka(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, 9898) == 1 and getPlayerStorageValue(cid, 13545) - os.time() < 1 or getPlayerStorageValue(cid, 13545) - os.time() == 0 then
doTeleportThing(cid, pos)
doPlayerPopupFYI(cid, "You VIP end.")
setPlayerStorageValue(cid, 9898, -1)
if string.find(tostring(getCreatureName(cid)),"[[VIP]]") then
addEvent(Vodka, 3*1000, cid)
end
end
return TRUE
end
 
use this script when vip finishes it will be kicked automatically



Lua:
function onLogin(cid)

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

local pos = {x = 154, y = 51, z = 7} -- Temple Position.

function Vodka(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, 9898) == 1 and getPlayerStorageValue(cid, 13545) - os.time() < 1 or getPlayerStorageValue(cid, 13545) - os.time() == 0 then
doTeleportThing(cid, pos)
doPlayerPopupFYI(cid, "You VIP end.")
setPlayerStorageValue(cid, 9898, -1)
if string.find(tostring(getCreatureName(cid)),"[[VIP]]") then
addEvent(Vodka, 3*1000, cid)
end
end
return TRUE
end
but the script above worked for you?
 

Similar threads

Back
Top