• 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 something wrong in script :(

skenchu

New Member
Joined
Mar 14, 2009
Messages
218
Reaction score
0
Location
Holland, Rotterdam
the error

tfs.png


VIP
Lua:
local days = 10
local levelToBeVIP = 1

function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerLevel(cid) >= levelToBeVIP then
                if isPlayerVip(cid) == FALSE then
                        doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for "..days.." days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
                end
                doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) 
                doPlayerAddVipDays(cid, days)
                doRemoveItem(item.uid, 1)
                doSendAnimatedText(getCreaturePosition(cid), "+"..days.." days", 10)
        else
                doPlayerSendCancel(cid, "You need level "..levelToBeVIP.." to be a VIP player.")
        end     
        return TRUE
end

VIP2

Lua:
local days = 2
local levelToBeVIP = 1

function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerLevel(cid) >= levelToBeVIP then
                if isPlayerVip(cid) == FALSE then
                        doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for "..days.." days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
                end
                doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) 
                doPlayerAddVipDays(cid, days)
                doRemoveItem(item.uid, 1)
                doSendAnimatedText(getCreaturePosition(cid), "+"..days.." days", 2)
        else
                doPlayerSendCancel(cid, "You need level "..levelToBeVIP.." to be a VIP player.")
        end     
        return TRUE
end

thanks for helping!
 
Last edited:

Similar threads

Back
Top