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

Vip days

Backy

Vivere militare est
Joined
Feb 25, 2009
Messages
157
Reaction score
2
Location
P(r)oland/Sanok
Hello i got a little problem with this script

Code:
  local config = {
        protectionLevel = getConfigInfo('protectionLevel'),
}
function onSay(cid, words, param, channel)
                news = "Okno wiedzy!"
                name = getPlayerName(cid)
            level = getPlayerLevel(cid)
            [B]vip = getPlayerVipDays(cid)[/B]
            access = getPlayerAccess(cid)
                version = "8.42"
                motto = "Staramy sie aby gra nie byla nudna."
                local hours = math.ceil(getWorldUpTime() / 3600) - 1
        local minutes = math.ceil((getWorldUpTime() - (3600 * hours)) / 60)
        if minutes == 60 then
                minutes = 0
                hours = hours + 1
        end
        doPlayerPopupFYI(cid, "Welcome to Thouria \nServer Information:\nProtection level: " .. config.protectionLevel .. "\nTo jest:\n " .. news .." \n  \n\n Zalogowany Jako:\n Nick: " .. name .."\n Poziom: " .. level .."\n Z-Fighter: " .. vip .."\n Dostep: " .. access .."\n\n Wersja Klienta: " .. version .." \n Uptime:  ".. hours .."  hours and " .. minutes .." minutes.")
        return TRUE
end

This dont show how much Vip days left.. why ?
For help rep++
Thanks :)
 
Please post the function "getPlayerVipDays(cid)" here and I will try to help you.

Also you should use local variables and not global in such a code.
Like this:
Code:
  local config = {
        protectionLevel = getConfigInfo('protectionLevel'),
}
function onSay(cid, words, param, channel)
                local news = "Okno wiedzy!"
                local name = getPlayerName(cid)
            local level = getPlayerLevel(cid)
            local vip = getPlayerVipDays(cid)
            local access = getPlayerAccess(cid)
                local version = "8.42"
                local motto = "Staramy sie aby gra nie byla nudna."
                local hours = math.ceil(getWorldUpTime() / 3600) - 1
        local minutes = math.ceil((getWorldUpTime() - (3600 * hours)) / 60)
        if minutes == 60 then
                minutes = 0
                hours = hours + 1
        end
        doPlayerPopupFYI(cid, "Welcome to Thouria \nServer Information:\nProtection level: " .. config.protectionLevel .. "\nTo jest:\n " .. news .." \n  \n\n Zalogowany Jako:\n Nick: " .. name .."\n Poziom: " .. level .."\n Z-Fighter: " .. vip .."\n Dostep: " .. access .."\n\n Wersja Klienta: " .. version .." \n Uptime:  ".. hours .."  hours and " .. minutes .." minutes.")
        return TRUE
end
 
Back
Top