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

Players can still access vip area after days end

mattchopz

New Member
Joined
Apr 2, 2020
Messages
10
Reaction score
0
I have a problem on my otserv... players use an item to get vip days but even after the days end they still can access the vip areas. Does anyone know how to fix this?
On the website the Account Status show "VIP ACCOUNT, -1 days left".
 
Solution
Seriously? Did you even try looking for the function?

Lua:
function getPlayerByName(name) local p = Player(name) return p and p:getId() or false end
You would need to post your account vip system.
Mostly likely when its taking away days its not doing a check for if 0 or less.
 
What a noob system. Your "system" is fucking garbage if that is the whole thing. I hope you didn't pay money for it.

I know your problem, but the fix requires more data:
What version of TFS do you run?
How is access to VIP area gated? Door action? I need to see that code too'
 
What a noob system. Your "system" is fucking garbage if that is the whole thing. I hope you didn't pay money for it.
It wasn't paid (luckily it seems). Do you suggest another one?

Access uses a teleport but players have to pass through a special tile (movement script attached)
 

Attachments

In your data>lib folder you probably have some more code for your vip system in there. there is definitely more code because isVIP is not a default function, so it's a function added. from the code you posted, looks like isVIP check is not working correctly.
 
In your data>lib folder you probably have some more code for your vip system in there. there is definitely more code because isVIP is not a default function, so it's a function added. from the code you posted, looks like isVIP check is not working correctly.
The vip system i attached above is from Lib
 
I just changed the whole system (using VIP BY MOCK). Now I get another error when using the commands to add, see or delete vip:

data/talkactions/scripts/VIP/addvip.lua:9: attempt to call global 'getPlayerByName' (a nil value)
stack traceback:
data/talkactions/scripts/VIP/addvip.lua:9: in function

Can anyone help me?
 

Attachments

Seriously? Did you even try looking for the function?

Lua:
function getPlayerByName(name) local p = Player(name) return p and p:getId() or false end
 
Solution
Seriously? Did you even try looking for the function?

Lua:
function getPlayerByName(name) local p = Player(name) return p and p:getId() or false end
Thank you very much for your help. Sorry but I dont understand much about scripting. =)
If I may ask, where do i put this line?
 
Back
Top